home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume91 / midi / casio / part01
Encoding:
Internet Message Format  |  1991-03-28  |  60.4 KB

  1. Path: news.larc.nasa.gov!amiga-request
  2. From: amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator)
  3. Subject: v91i076: CASIO - download 16-bit samples from a Casio FZ-1 to an Amiga, Part01/01
  4. Reply-To: karl@sugar.hackercorp.com (Karl Lehenbauer)
  5. Newsgroups: comp.sources.amiga
  6. Message-ID: <comp.sources.amiga:v91i076@ab20.larc.nasa.gov>
  7. Date: 28 Mar 91 16:19:54 GMT
  8. Approved: tadguy@uunet.UU.NET (Tad Guy)
  9. X-Mail-Submissions-To: amiga@uunet.uu.net
  10. X-Post-Discussions-To: comp.sys.amiga.misc
  11.  
  12. Submitted-by: karl@sugar.hackercorp.com (Karl Lehenbauer)
  13. Posting-number: Volume 91, Issue 076
  14. Archive-name: midi/casio/part01
  15.  
  16. [ includes uuencoded executables  ...tad ]
  17.  
  18. Here is my program to download 16-bit samples from a Casio FZ-1 to an Amiga.
  19. You'll need Bill Barton's MIDI library, version 2, to make it work.
  20. Also to do much useful with it, you'll need a Casio FZ-1 (the kicker), and 
  21. FZIFF, a companion program (simultaneously posted) to downconvert the 16-bit 
  22. samples to the 8-bit Amiga IFF 8SVX format.
  23.  
  24. Audiomaster, or equivalent, is also required to do some tweaking,
  25. see the README in the FZIFF kit for details.  These requirements
  26. limit the potential audience of the program a good deal of course,
  27. but the people that do have the necessary prerequisites will be able
  28. to create Amiga sounds of unparalleled quality.
  29.  
  30. #!/bin/sh
  31. # This is a shell archive.  Remove anything before this line, then unpack
  32. # it by saving it into a file and typing "sh file".  To overwrite existing
  33. # files, type "sh file -c".  You can also feed this as standard input via
  34. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  35. # will see the following message at the end:
  36. #        "End of archive 1 (of 1)."
  37. # Contents:  Makefile README casio.c casio.h casio.uu cleanup.c
  38. #   dumpvoice.c fz1.h hilo.c hilo.uu prototypes.h timer.c
  39. # Wrapped by tadguy@ab20 on Thu Mar 28 11:19:52 1991
  40. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  41. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  42.   echo shar: Will not clobber existing file \"'Makefile'\"
  43. else
  44. echo shar: Extracting \"'Makefile'\" \(205 characters\)
  45. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  46. Xall: casio hilo
  47. X
  48. XOFILES= casio.o timer.o 
  49. X
  50. XCFLAGS= -bs
  51. X
  52. XSDBFLAGS= -g
  53. X
  54. Xcasio:    $(OFILES)
  55. X    ln $(SDBFLAGS) $(OFILES) -lhack -lc
  56. X
  57. Xdebug:
  58. X    cc -n casio.c
  59. X    ln +q -g casio.o -lmidi -lc
  60. X
  61. Xhilo:    hilo.o
  62. X    ln hilo.o -lc
  63. END_OF_FILE
  64. if test 205 -ne `wc -c <'Makefile'`; then
  65.     echo shar: \"'Makefile'\" unpacked with wrong size!
  66. fi
  67. # end of 'Makefile'
  68. fi
  69. if test -f 'README' -a "${1}" != "-c" ; then 
  70.   echo shar: Will not clobber existing file \"'README'\"
  71. else
  72. echo shar: Extracting \"'README'\" \(3066 characters\)
  73. sed "s/^X//" >'README' <<'END_OF_FILE'
  74. XHere is CASIO, a primitive program to download 16-bit voices from the
  75. XCasio FZ-1 synthesizer to the Amiga computer.
  76. X
  77. XThis program only has a limited audience, but for those who have an
  78. XFZ-1 and want the ultimate in sample quality on the Amiga, it will
  79. Xbe a godsend.
  80. X
  81. XYou'll need Bill Barton's MIDI library, version 2.0.  It's around,
  82. Xon Fred Fish disks, archive sites, etc.  Contact me for it as a last
  83. Xresort.
  84. X
  85. XThe program includes the binary, CASIO, and the source code, plus a
  86. XMakefile for Aztec C 5.0 or later.
  87. X
  88. XTo use CASIO, get your Casio FZ-1 MIDI'ed up bidirectionally to the Amiga
  89. X(out-to-in and in-to-out, the Amiga needs a bidirectional link so it can
  90. Xack or nack the packets as it receives them)
  91. X
  92. XVerify the link with some other program that you know works.
  93. X
  94. XFinally, use the Casio front panel to select an output device of
  95. XMIDI, run CASIO with an argument being the filename you want
  96. Xwritten on the Amiga, as in "casio train_whistle", then select
  97. X"voice dump" on the Casio and hit "save".
  98. X
  99. XThe Casio firmware is sensitive to data errors at the wrong point in the
  100. Xprotocol, so if you get one, your Casio will hang and it will have
  101. Xto be power-cycled.  Thus it's probably a good idea to save a killer
  102. Xvoice to disk on the Casio before trying to download it to the Amiga,
  103. Xjust in case.
  104. X
  105. XRemember that MIDI is pretty slow for samples, MIDI goes at 3000 bytes
  106. Xper sample, but the transfer format only sends 4 bits per byte, plus
  107. Xthere are delays for acks, so for example a 100 Kbyte sample would
  108. Xtake at least a couple of minutes to transfer.  You should see the
  109. Xsame indication on the Casio you see when it is saving to disk (a moving
  110. Xblip), but it will move much, much slower when going to MIDI.
  111. X
  112. XTo convert the raw 16-bit data of the Casio FZ-1 over to the Amiga
  113. XIFF 8SVX sample format, use my FZIFF program, a companion release.
  114. X
  115. XNote that the Amiga cannot play back a sample faster than around
  116. X25,000 samples per second.  This pretty much dictates that you use
  117. Xthe 18K sample rate on the Casio when sampling for the Amiga.
  118. X
  119. XMy recently posted SMUS player is particularly useful with
  120. Xthese samples, because you can create multisampled instruments that
  121. Xdo not suffer from the one-sample-per-octave and each-sample-must-be-
  122. Xof-exactly-the-same-length problems that the IFF 8SVX.
  123. X
  124. XThe program HILO, which is included, simply traverses a sample file
  125. Xyou've received from your FZ-1 and prints the highest and lowest
  126. Xsample values found.  The highest possible value is 32767 and the
  127. Xlowest is -32768.  If you run it and the values aren't in this
  128. Xvicinity, you might want to resample at a higher volume.  Of course
  129. Xif they're exactly those values or really really close, the voulme
  130. Xmight be too high, resulting in distortion.  If it's just close, you
  131. Xusually won't notice -- let your ear be the judge.  This distortion
  132. Xusually shows up as a sort of crackling sound when played back, or when
  133. Xplayed back on the Amiga.
  134. X
  135. XShare and Enjoy,
  136. X
  137. XKarl Lehenbauer
  138. X3918 Panorama
  139. XMissouri City, TX  77459
  140. X
  141. XInternet/BITNET: karl@sugar.hackercorp.com
  142. XUsenet: uunet!sugar!karl
  143. X
  144. END_OF_FILE
  145. if test 3066 -ne `wc -c <'README'`; then
  146.     echo shar: \"'README'\" unpacked with wrong size!
  147. fi
  148. # end of 'README'
  149. fi
  150. if test -f 'casio.c' -a "${1}" != "-c" ; then 
  151.   echo shar: Will not clobber existing file \"'casio.c'\"
  152. else
  153. echo shar: Extracting \"'casio.c'\" \(10606 characters\)
  154. sed "s/^X//" >'casio.c' <<'END_OF_FILE'
  155. X/* casio - download sample data from a casio fz-1 */
  156. X
  157. X/* Copyright (C) 1988 Hackercorp.   All Rights Reserved */
  158. X
  159. X#include <libraries/dos.h>
  160. X#include <clib/macros.h>
  161. X#include <midi/midi.h>
  162. X#include <functions.h>
  163. X#include <stdio.h>
  164. X#include <devices/timer.h>
  165. X
  166. X#include "casio.h"
  167. X#include "prototypes.h"
  168. X
  169. Xchar *program_name = "casio fz1 download program";
  170. X
  171. X#define CheckMsg(m) (m->mp_MsgList.lh_Head->ln_Succ != 0)
  172. X
  173. Xextern struct timerequest *timer_request;
  174. X
  175. X/* message ids for fz-1 system exclusive messages */
  176. X#define OPEN_MIDI_MSG 0x70
  177. X#define CLOSE_MIDI_MSG 0x71
  178. X#define OK_MIDI_MSG 0x72
  179. X#define ERR_MIDI_MSG 0x73
  180. X#define DATA_MIDI_MSG 0x74
  181. X#define EFFECT_MIDI_MSG 0x76
  182. X#define REMOTE_MIDI_MSG 0x7f
  183. X
  184. X/* additional messages I define as responses from its_an_fz1_message */
  185. X#define NOT_A_FZ_MESSAGE 0
  186. X#define NOT_THE_REQUESTED_FZ_CHANNEL 1
  187. X#define DATA_ERROR 2
  188. X
  189. X/* states for the i/o loop */
  190. X#define WAITING_FOR_OPEN 0
  191. X#define READING_FZ_DATA 1
  192. X
  193. X#define MAX_RETRIES 10
  194. X
  195. X#define CAPTURE_BUFFER_SIZE 16384
  196. XUBYTE capture_buffer[CAPTURE_BUFFER_SIZE];
  197. X
  198. Xvoid *MidiBase = NULL;
  199. Xvoid *IntuitionBase = NULL;
  200. X
  201. Xstruct MDest *dest = NULL;
  202. Xstruct MSource *source = NULL;
  203. X
  204. Xstruct MRoute *route_a = NULL;
  205. Xstruct MRoute *route_b = NULL;
  206. X
  207. XUBYTE *msg;            /* buffer this in case we get shut down before freeing the current message */
  208. X
  209. Xint capture_position = 0;
  210. X
  211. Xvoid midi_cleanup(void)
  212. X{
  213. X    /* if (msg) 
  214. X        FreeMidiMsg(msg); */
  215. X
  216. X    if (IntuitionBase)
  217. X        CloseLibrary(IntuitionBase);
  218. X
  219. X    if (dest) 
  220. X        DeleteMDest(dest);
  221. X    if (source)
  222. X        DeleteMSource(source);
  223. X
  224. X    if (route_a)
  225. X        DeleteMRoute(route_a);
  226. X    if (route_b)
  227. X        DeleteMRoute(route_b);
  228. X
  229. X    if (MidiBase) 
  230. X        CloseLibrary(MidiBase);
  231. X}
  232. X
  233. X/* if channel is -1, any channel is ok (within FZ-1 System Exclusive message) */
  234. X
  235. X/* validate the incoming message, including all sorts of stuff about the header
  236. X * and anything we know specifically within the message type as well */
  237. X
  238. XUBYTE its_an_fz1_message(UBYTE *msg, int requested_channel)
  239. X{
  240. X    int channel, length, expected_length;
  241. X    struct FZ1_Message *p;
  242. X
  243. X    p = (struct FZ1_Message *)msg;
  244. X
  245. X    /* compare first bytes of message,
  246. X       extract channel number and verify,
  247. X       return function code
  248. X     */
  249. X    length = MidiMsgLength(msg);
  250. X
  251. X    if ((p->casio_id != 0x44) || (p->fz1_id != 0x200)
  252. X        || ((p->encoded_channel & 0xf0) != 0x70))
  253. X            return(NOT_A_FZ_MESSAGE);
  254. X
  255. X    channel = (p->encoded_channel & 0x0f);
  256. X    if ((requested_channel != -1) && (channel != requested_channel))
  257. X        return(NOT_THE_REQUESTED_FZ_CHANNEL);
  258. X
  259. X    switch(p->command)
  260. X    {
  261. X        case OPEN_MIDI_MSG:
  262. X            expected_length = 16;
  263. X            break;
  264. X
  265. X        case CLOSE_MIDI_MSG:
  266. X            expected_length = 7;
  267. X            break;
  268. X
  269. X        case DATA_MIDI_MSG:
  270. X            expected_length =  136;
  271. X            if (length == expected_length && (p->body.datamsg.checksum != calc_checksum(p)))
  272. X            {
  273. X                 fprintf(stderr,"checksum error, expected %x, saw %x\n",
  274. X                     p->body.datamsg.checksum,calc_checksum(p));
  275. X                 return(DATA_ERROR);
  276. X            }
  277. X            break;
  278. X
  279. X        /* haven't seen any of these yet */
  280. X        case OK_MIDI_MSG:
  281. X        case ERR_MIDI_MSG:
  282. X        case EFFECT_MIDI_MSG:
  283. X        case REMOTE_MIDI_MSG:
  284. X            panic("got a message I don't know how to handle");
  285. X
  286. X        /* it wasn't a message we understood yet it had all the makings of
  287. X         * being one, it must be garbled */
  288. X        default:
  289. X            return(DATA_ERROR);
  290. X    }
  291. X    if (length != expected_length)
  292. X        return(DATA_ERROR);
  293. X
  294. X    return(p->command);
  295. X}
  296. X
  297. Xvoid commune_with_fz1(struct MSource *source, struct MDest *dest, int channel, int outfd)
  298. X{
  299. X    long len;
  300. X    UBYTE *ip;
  301. X    int command, retry_count = 0;
  302. X    int state = WAITING_FOR_OPEN;
  303. X    ULONG waitflags;
  304. X    int packets_received = 0, error_count = 0, done = 0;
  305. X    struct FZ1_Message *p;
  306. X
  307. X    /* wait for a message or control-C or "done" control var to be set */
  308. X    while ((!((waitflags = Wait(-1)) & SIGBREAKF_CTRL_C)) && !done)
  309. X    {     
  310. X        /* if ((waitflags & SIGBREAKF_CTRL_D) && (state = READING_FZ_DATA))
  311. X        {
  312. X            printf("saw a ^d\n");
  313. X            goto data_error;
  314. X        } */
  315. X
  316. X        /* while there are messages to process, process messages */
  317. X        while (!done && (msg = GetMidiMsg(dest)))
  318. X        {        
  319. X            /* discard all but system exclusive data - should be done
  320. X             * by the route, check someday to see if we can find our
  321. X             * route and change it if it isn't */
  322. X            if (*msg != MS_SYSEX)
  323. X                goto message_done;
  324. X
  325. X            p = (struct FZ1_Message *)msg;
  326. X            command = its_an_fz1_message((UBYTE *)p,channel);
  327. X
  328. X            if (state == WAITING_FOR_OPEN)
  329. X            {
  330. X                if (command != OPEN_MIDI_MSG)
  331. X                    panic("out of sync - looking for 'Open' from FZ1");
  332. X
  333. X                /* we need to specify a channel ID in our messages
  334. X                 * if we're not looking for a specific one, reply
  335. X                 * with the one we got in the first message */
  336. X                if (channel == -1)
  337. X                    channel = p->encoded_channel & 0x0f;
  338. X                state = READING_FZ_DATA;
  339. X                dump_open(p);
  340. X                send_fz(source,channel,OK_MIDI_MSG);
  341. X                goto message_done;
  342. X            }
  343. X
  344. X            if (state == READING_FZ_DATA)
  345. X            {
  346. X                abort_timeout_timer();
  347. X                switch(command)
  348. X                {
  349. X                    case DATA_MIDI_MSG:
  350. X                        send_fz(source,channel,OK_MIDI_MSG);
  351. X                        start_timeout_timer();
  352. X                        packets_received++;
  353. X                        if ((packets_received % 10) == 0)
  354. X                        {
  355. X                            printf("%4d ok \r",packets_received);
  356. X                            fflush(stdout);
  357. X                        }
  358. X                        capture(p,outfd);
  359. X                        retry_count = 0;
  360. X                        break;
  361. X
  362. X                    case DATA_ERROR:
  363. X                    data_error:
  364. X                        send_fz(source,channel,ERR_MIDI_MSG);
  365. X                        start_timeout_timer();
  366. X                        printf("%4d err\r",packets_received);
  367. X                        fflush(stdout);
  368. X                        error_count++;
  369. X                        if (++retry_count > MAX_RETRIES)
  370. X                            panic("exceeded max retries for a packet - transfer failed");
  371. X                        break;
  372. X
  373. X                    /* we get this when the fz is done */
  374. X                    case CLOSE_MIDI_MSG:
  375. X                        fprintf(stderr,"casio is done\n");
  376. X                        done = 1;
  377. X                        break;
  378. X
  379. X                    default:
  380. X                        fprintf(stderr,"unknown command = 0x%x\n",command);
  381. X                        if (state = READING_FZ_DATA)
  382. X                        {
  383. X                            fprintf(stderr,"will try treating it as a data error\n");
  384. X                            goto data_error;
  385. X                        }
  386. X                        else
  387. X                            panic("unknown command and not in 'read' mode");
  388. X                }
  389. X                goto message_done;
  390. X            }
  391. X
  392. X            panic("state variable fried");
  393. X
  394. X            message_done: FreeMidiMsg(msg);                /* free it */
  395. X        }
  396. X
  397. X        if (CheckMsg(timer_request->tr_node.io_Message.mn_ReplyPort) && 
  398. X         (GetMsg(timer_request->tr_node.io_Message.mn_ReplyPort)) )
  399. X        {
  400. X            if (state == READING_FZ_DATA)
  401. X            {
  402. X                send_fz(source,channel,ERR_MIDI_MSG);
  403. X                printf("%4d tmo\r",packets_received);
  404. X                fflush(stdout);
  405. X                error_count++;
  406. X                if (++retry_count > MAX_RETRIES)
  407. X                    panic("exceeded max retries for a packet - transfer failed");
  408. X            }
  409. X        }
  410. X    }
  411. X    if (capture_position != 0)
  412. X    {
  413. X        if (write(outfd,capture_buffer,capture_position) != capture_position)
  414. X            perror("output file");
  415. X    }
  416. X    printf("total packets received %d (%d retries)\n",packets_received,error_count);
  417. X}
  418. X
  419. Xvoid send_fz(struct MSource *source, int channel_id, int message_id)
  420. X{
  421. X    static UBYTE buf[] = {0xf0, 0x44, 0x02, 0x00, 0x70,0x00,0xf7};
  422. X    buf[4] |= channel_id;
  423. X    buf[5] = message_id;
  424. X    PutMidiMsg(source,buf);
  425. X}
  426. X
  427. Xint calc_checksum(struct FZ1_Message *p)
  428. X{
  429. X    UBYTE *ip, lownibble, hinibble;
  430. X    int len, running_sum;
  431. X
  432. X    /* I assume the message has already been validated as a Casio FZ-1 
  433. X     * data message
  434. X     */
  435. X
  436. X    ip = &p->body.datamsg.data[0];
  437. X
  438. X    for (len = 0, running_sum = 0; len < 128; len++)
  439. X    {
  440. X        running_sum += *ip++;
  441. X    }
  442. X    return((0 - running_sum) & 0x7f);
  443. X}
  444. X
  445. Xvoid capture(struct FZ1_Message *p, int outfd)
  446. X{
  447. X    UBYTE *ip, lownibble, hinibble;
  448. X    int len;
  449. X
  450. X    ip = &p->body.datamsg.data[0];
  451. X
  452. X    for (len = 0; len < 64; len++)
  453. X    {
  454. X        lownibble = *ip++;
  455. X        hinibble = *ip++;
  456. X        capture_buffer[capture_position++] = (hinibble << 4) | lownibble;
  457. X        if (capture_position >= CAPTURE_BUFFER_SIZE)
  458. X        {
  459. X            if (write(outfd,capture_buffer,CAPTURE_BUFFER_SIZE) != CAPTURE_BUFFER_SIZE)
  460. X            {
  461. X                perror("output file");
  462. X            }
  463. X            capture_position = 0;
  464. X        }
  465. X    }
  466. X}
  467. X
  468. Xstruct MRouteInfo myrouteinfo =
  469. X{
  470. X    MMF_SYSEX,0xffff,0,0,{0},{0}
  471. X};
  472. X
  473. Xmain(int argc,char *argv[])
  474. X{
  475. X
  476. X    char *sname, *dname, *filename;
  477. X    int outfd;
  478. X    int wanted_channel = -1;
  479. X
  480. X    fprintf(stderr,"ready to talk to casio, the routes are done automatically from\n");
  481. X    fprintf(stderr,"midi_in if it's available, else MidiIn and to MidiOut.\n");
  482. X    fprintf(stderr,"I download and exit when done.  I automatically do retries.\n");
  483. X    fprintf(stderr,"Nonetheless, I may 'hang' when uploading.  This is soft.\n");
  484. X    fprintf(stderr,"Hit ^D to retry.  Or hit ^C, I'll exit.\n");
  485. X    fprintf(stderr,"I write to the file on the fly (every 256 packets), so watch it.\n");
  486. X    if (argc != 2)
  487. X    {
  488. X        fprintf(stderr,"usage: casio filename, routes are automatic, then\n");
  489. X        fprintf(stderr," select FZ output device as 'midi' and do a voice save\n");
  490. X        exit(1);
  491. X    }
  492. X
  493. X    sname = "FZ1out";
  494. X    dname = "FZ1in";
  495. X    filename = argv[1];
  496. X
  497. X    if ((outfd = creat(filename,0666)) == -1)
  498. X    {
  499. X        fprintf(stderr,"couldn't create output file\n");
  500. X        perror(filename);
  501. X        exit(2);
  502. X    }
  503. X
  504. X    if (!(IntuitionBase = OpenLibrary("intuition.library",0)))
  505. X    {
  506. X        fprintf(stderr,"can't open intuition.library\n");
  507. X        goto clean;
  508. X    }
  509. X
  510. X    add_cleanup(midi_cleanup);
  511. X
  512. X    if (!(MidiBase = OpenLibrary(MIDINAME,MIDIVERSION))) 
  513. X    {
  514. X        fprintf(stderr,"can't open midi.library\n");
  515. X        goto clean;
  516. X    }
  517. X
  518. X    /* create our public source node */
  519. X    if (!(source = CreateMSource(sname,NULL)))
  520. X    {
  521. X        fprintf(stderr,"can't create Source port %s\n",sname);
  522. X        goto clean;
  523. X    }
  524. X
  525. X    /* create our dest node (public) */
  526. X    if (!(dest = CreateMDest(dname,NULL))) 
  527. X    {
  528. X        fprintf(stderr,"can't create Dest port %s\n",dname);
  529. X        goto clean;
  530. X    }
  531. X
  532. X    route_a = MRoutePublic("midi_in",dname,&myrouteinfo);
  533. X    if (!route_a)
  534. X        route_a = MRoutePublic("MidiIn",dname,&myrouteinfo);
  535. X
  536. X    route_b = MRoutePublic(sname,"MidiOut",&myrouteinfo);
  537. X
  538. X    init_timer();
  539. X
  540. X    commune_with_fz1(source,dest,wanted_channel,outfd);       /* process until shutdown */
  541. X
  542. Xclean:
  543. X    close(outfd);
  544. X    cleanup();
  545. X    exit(0);
  546. X}
  547. X
  548. Xvoid _abort(void)       /* abort routine called when CTRL-C is hit (Aztec) */
  549. X{
  550. X    /* fflush(stdout); cleanup(); exit(1); */
  551. X} /* we're polling it in the loop */
  552. X
  553. Xvoid dump_open(struct FZ1_Message *p)
  554. X{
  555. X    unsigned int nblocks;
  556. X
  557. X    printf("dump of Open MIDI message received from Casio FZ-1\n");
  558. X    printf("channel %d, status %d, ",p->encoded_channel & 0x0f,p->body.openmsg.status);
  559. X    printf("banks %d, voices %d, ",p->body.openmsg.banks,p->body.openmsg.voices);
  560. X
  561. X    if(p->body.openmsg.status != 1 || p->body.openmsg.banks != 0 
  562. X        || p->body.openmsg.voices != 1)
  563. X        panic("I don't know how to do anything other than save a single voice");
  564. X
  565. X    nblocks = (p->body.openmsg.nblocks_hinibble << 12) 
  566. X        | (p->body.openmsg.nblocks_next_to_hinibble << 8) 
  567. X        | (p->body.openmsg.nblocks_next_to_lonibble << 4) 
  568. X        | p->body.openmsg.nblocks_lonibble;
  569. X    printf("nblocks %d, ",nblocks);
  570. X    printf("edit bank %d, edit voice %d\n",p->body.openmsg.edit_bank,p->body.openmsg.edit_voice);
  571. X}
  572. X
  573. X/* end of casio.c */
  574. X
  575. END_OF_FILE
  576. if test 10606 -ne `wc -c <'casio.c'`; then
  577.     echo shar: \"'casio.c'\" unpacked with wrong size!
  578. fi
  579. # end of 'casio.c'
  580. fi
  581. if test -f 'casio.h' -a "${1}" != "-c" ; then 
  582.   echo shar: Will not clobber existing file \"'casio.h'\"
  583. else
  584. echo shar: Extracting \"'casio.h'\" \(561 characters\)
  585. sed "s/^X//" >'casio.h' <<'END_OF_FILE'
  586. X/* casio.h - casio fz1 midi include file */
  587. X
  588. Xstruct FZ1_OpenMsg
  589. X{
  590. X    UBYTE status;
  591. X    UBYTE banks;
  592. X    UBYTE voices;
  593. X    UBYTE nblocks_lonibble;
  594. X    UBYTE nblocks_next_to_lonibble;
  595. X    UBYTE nblocks_next_to_hinibble;
  596. X    UBYTE nblocks_hinibble;
  597. X    UBYTE edit_bank;
  598. X    UBYTE edit_voice;
  599. X    UBYTE eox;
  600. X};
  601. X
  602. Xstruct FZ1_DataMsg
  603. X{
  604. X    UBYTE data[128];
  605. X    UBYTE checksum;
  606. X    UBYTE eox;
  607. X};
  608. X
  609. Xstruct FZ1_Message
  610. X{
  611. X    UBYTE sysex;
  612. X    UBYTE casio_id;
  613. X    short fz1_id;
  614. X    UBYTE encoded_channel;
  615. X    UBYTE command;
  616. X    union {
  617. X        struct FZ1_DataMsg datamsg;
  618. X        struct FZ1_OpenMsg openmsg;
  619. X    } body;
  620. X};
  621. X
  622. X/* end of casio.h */
  623. END_OF_FILE
  624. if test 561 -ne `wc -c <'casio.h'`; then
  625.     echo shar: \"'casio.h'\" unpacked with wrong size!
  626. fi
  627. # end of 'casio.h'
  628. fi
  629. if test -f 'casio.uu' -a "${1}" != "-c" ; then 
  630.   echo shar: Will not clobber existing file \"'casio.uu'\"
  631. else
  632. echo shar: Extracting \"'casio.uu'\" \(18036 characters\)
  633. sed "s/^X//" >'casio.uu' <<'END_OF_FILE'
  634. Xbegin 644 casio
  635. XM```#\P`````````#``````````(```N,```0[@````$```/I```+C$[Z%KYC3
  636. XM87-I;R!F>C$@9&]W;FQO860@<')O9W)A;0``3E7__$CG``!*K(`*9P``%BM.P
  637. XM__PB;(`*+&R#4DZN_F(L;?_\2JR`#F<``!8K3O_\(&R`#BQL@`9.KO^^+&W_N
  638. XM_$JL@!)G```6*T[__"!L@!(L;(`&3J[_T"QM__Q*K(`69P``%BM.__P@;(`6O
  639. XM+&R`!DZN_Z8L;?_\2JR`&F<``!8K3O_\(&R`&BQL@`9.KO^F+&W__$JL@`9GP
  640. XM```6*T[__")L@`8L;(-23J[^8BQM__Q,WP``3EU.=4Y5_^Q(YP``*VT`"/_P@
  641. XM*T[_["!M``@L;(`&3J[_=BQM_^PK0/_X(&W_\`PH`$0``68``"H@;?_P#&@"E
  642. XM```"9@``'"!M__!P`!`H``0"@````/`,@````'!G```,<`!,WP``3EU.=2!MC
  643. XM__!P`!`H``0"@`````\K0/_\#*W_____``QG```2("W__+"M``QG```&<`%@[
  644. XMR"!M__!P`!`H``5@``"J*WP````0__1@``"R*WP````'__1@``"F*WP```"(-
  645. XM__0@+?_XL*W_]&8``$HO+?_P3KH%Q%A/(&W_\'(`$B@`AK"!9P``,"\M__!.)
  646. XMN@6J6$\O`"!M__!P`!`H`(8O`$AZ`'Q(;(&\3KH2#D_O`!!P`F``_TA@``!&\
  647. XM2'H`ATZZ#TQ83W`"8`#_-/]&_U+_OO^^_U[_R/^^_\C_R/_(_\C_R/_(_\C_Y
  648. XMR/^^!$``<`Q``!!DT-!`,#L`TD[[```@+?_XL*W_]&<```AP`F``_NX@;?_P<
  649. XM<``0*``%8`#^X&-H96-K<W5M(&5R<F]R+"!E>'!E8W1E9"`E>"P@<V%W("5XW
  650. XM"@!G;W0@82!M97-S86=E($D@9&]N)W0@:VYO=R!H;W<@=&\@:&%N9&QE`$Y5^
  651. XM_]1(YP``0JW_\$*M_^Q"K?_D0JW_X$*M_]PK3O_4</\L;(-23J[^PBQM_]0K?
  652. XM0/_H"```#&8``J)*K?_<9@`"FDJM_]QF``((*T[_U"!M``PL;(`&3J[_CBQM`
  653. XM_]0I0(-69P`!["!L@U8,$`#P9@`!R"ML@U;_V"\M`!`O+?_83KK]L%!/`H``%
  654. XM``#_*T#_]$JM_^QF``!B#*T```!P__1G```,2'H"?DZZ#?983PRM_____P`0/
  655. XM9@``%B!M_]AP`!`H``0"@`````\K0``0*WP````!_^PO+?_83KH*$EA/2'@`I
  656. XM<B\M`!`O+0`(3KH#H$_O``Q@``%"#*T````!_^QF``$L3KH-5"`M__1@``$&B
  657. XM2'@`<B\M`!`O+0`(3KH#<$_O``Q.N@SR4JW_Y'(*("W_Y$ZZ)$!F```:+RW_B
  658. XMY$AZ`@Y.NA$F4$](;(&F3KHA!EA/+RT`%"\M_]A.N@/$4$]"K?_P8```Q$AX8
  659. XM`',O+0`0+RT`"$ZZ`QA/[P`,3KH,FB\M_^1(>@'13KH0X%!/2&R!IDZZ(,!8C
  660. XM3U*M_^!2K?_P#*T````*__!O```,2'H!LDZZ#.Y83V```')(>@'82&R!O$ZZ,
  661. XM#XA03RM\`````?_<8```6"\M__1(>@')2&R!O$ZZ#VI/[P`,*WP````!_^QG"
  662. XM```42'H!Q4AL@;Q.N@].4$]@`/]D2'H!V4ZZ#)183V```!A5@&<`_U`$@```&
  663. XM`&]GF%>`9P#^ZF"J8```#$AZ`=A.N@QL6$\K3O_4(&R#5BQL@`9.KO^"+&W_P
  664. XMU&``_?0@;(-:(&@`#B!H`!1*D&<``'8K3O_4(&R#6B!H``XL;(-23J[^C"QM.
  665. XM_]1*@&<``%@,K0````'_[&8``$Q(>`!S+RT`$"\M``A.N@'T3^\`#"\M_^1($
  666. XM>@%W3KH/P%!/2&R!IDZZ'Z!83U*M_^!2K?_P#*T````*__!O```,2'H!6$ZZ-
  667. XM"\Y83V``_41*K(`>9P``*"\L@!Y(;(->+RT`%$ZZ)7Q/[P`,L*R`'F<```Q(J
  668. XM>@%:3KH.;EA/+RW_X"\M_^1(>@%43KH/5$_O``Q,WP``3EU.=6]U="!O9B!S_
  669. XM>6YC("T@;&]O:VEN9R!F;W(@)T]P96XG(&9R;VT@1EHQ`"4T9"!O:R`-`"4T3
  670. XM9"!E<G(-`&5X8V5E9&5D(&UA>"!R971R:65S(&9O<B!A('!A8VME="`M('1RH
  671. XM86YS9F5R(&9A:6QE9`!C87-I;R!I<R!D;VYE"@!U;FMN;W=N(&-O;6UA;F0@.
  672. XM/2`P>"5X"@!W:6QL('1R>2!T<F5A=&EN9R!I="!A<R!A(&1A=&$@97)R;W(*A
  673. XM`'5N:VYO=VX@8V]M;6%N9"!A;F0@;F]T(&EN("=R96%D)R!M;V1E`'-T871EZ
  674. XM('9A<FEA8FQE(&9R:65D`"4T9"!T;6\-`&5X8V5E9&5D(&UA>"!R971R:65S%
  675. XM(&9O<B!A('!A8VME="`M('1R86YS9F5R(&9A:6QE9`!O=71P=70@9FEL90!T\
  676. XM;W1A;"!P86-K971S(')E8V5I=F5D("5D("@E9"!R971R:65S*0H`3E7__$CGZ
  677. XM``!P`!`L@":`K0`,&4"`)AEM`!.`)RM.__Q![(`B(D@@;0`(+&R`!DZN_X@L9
  678. XM;?_\3-\``$Y=3G5.5?_R2.<``"MM``C__%RM__Q"K?_V0JW_\F````92K?_V!
  679. XM#*T```"`__9L```4(&W__%*M__QP`!`0T:W_\F#><`"0K?_R`H````!_3-\`W
  680. XM`$Y=3G5.5?_V2.<``"MM``C__%RM__Q"K?_V8```!E*M__8,K0```$#_]FP`L
  681. XM`'8@;?_\4JW__!M0__L@;?_\4JW__!M0__IP`!`M__KI@'(`$BW_^X"!(BR`,
  682. XM'E*L@!Y![(->$8`8``RL``!``(`>;0``+DAX0`!(;(->+RT`#$ZZ(M!/[P`,C
  683. XM#(```$``9P``#$AZ`!A.N@O`6$]"K(`>8`#_?DS?``!.74YU;W5T<'5T(&9IU
  684. XM;&4`3E7_Y$CG```K?/______[$AZ`F9(;(&\3KH+8%!/2'H"F$AL@;Q.N@M2S
  685. XM4$](>@+"2&R!O$ZZ"T103TAZ`O%(;(&\3KH+-E!/2'H#'4AL@;Q.N@LH4$](/
  686. XM>@,X2&R!O$ZZ"QI03PRM`````@`(9P``*$AZ`V!(;(&\3KH+`%!/2'H#A4AL*
  687. XM@;Q.N@KR4$](>``!3KHB\%A/0?H#I2M(__Q!^@.D*TC_^"!M``PK:``$__1(J
  688. XM>`&V+RW_]$ZZ$:903RM`__`,@/____]F```D2'H#?$AL@;Q.N@JD4$\O+?_T>
  689. XM3KH*P%A/2'@``DZZ(IA83RM._^AP`$/Z`W$L;(-23J[]V"QM_^@I0(`*9@``\
  690. XM%$AZ`VM(;(&\3KH*9%!/8``!/DAZ]HA.N@AV6$\K3O_H<`=#^@-G+&R#4DZN]
  691. XM_=@L;?_H*4"`!F8``!1(>@-<2&R!O$ZZ"BI03V```00K3O_HD\D@;?_\+&R`L
  692. XM!DZN_]8L;?_H*4"`$F8``!HO+?_\2'H#04AL@;Q.N@GV3^\`#&```,XK3O_H_
  693. XMD\D@;?_X+&R`!DZN_\0L;?_H*4"`#F8``!HO+?_X2'H#*$AL@;Q.N@G`3^\`T
  694. XM#&```)A([40`_^1![(`J)$@B;?_X0?H#'RQL@`9.KO^43.U$`/_D*4"`%DJL(
  695. XM@!9F```H2.U$`/_D0>R`*B1((FW_^$'Z`ODL;(`&3J[_E$SM1`#_Y"E`@!9(3
  696. XM[40`_^1![(`J)$A#^@+>(&W__"QL@`9.KO^43.U$`/_D*4"`&DZZ!;0O+?_P8
  697. XM+RW_["\L@`XO+(`23KKWVD_O`!`O+?_P3KHBVEA/3KH';$*G3KHA%EA/3-\`O
  698. XM`$Y=3G5R96%D>2!T;R!T86QK('1O(&-A<VEO+"!T:&4@<F]U=&5S(&%R92!DO
  699. XM;VYE(&%U=&]M871I8V%L;'D@9G)O;0H`;6ED:5]I;B!I9B!I="=S(&%V86EL%
  700. XM86)L92P@96QS92!-:61I26X@86YD('1O($UI9&E/=70N"@!)(&1O=VYL;V%D-
  701. XM(&%N9"!E>&ET('=H96X@9&]N92X@($D@875T;VUA=&EC86QL>2!D;R!R971RE
  702. XM:65S+@H`3F]N971H96QE<W,L($D@;6%Y("=H86YG)R!W:&5N('5P;&]A9&EN7
  703. XM9RX@(%1H:7,@:7,@<V]F="X*`$AI="!>1"!T;R!R971R>2X@($]R(&AI="!>/
  704. XM0RP@22=L;"!E>&ET+@H`22!W<FET92!T;R!T:&4@9FEL92!O;B!T:&4@9FQYJ
  705. XM("AE=F5R>2`R-38@<&%C:V5T<RDL('-O('=A=&-H(&ET+@H`=7-A9V4Z(&-AQ
  706. XM<VEO(&9I;&5N86UE+"!R;W5T97,@87)E(&%U=&]M871I8RP@=&AE;@H`('-E6
  707. XM;&5C="!&6B!O=71P=70@9&5V:6-E(&%S("=M:61I)R!A;F0@9&\@82!V;VECF
  708. XM92!S879E"@!&6C%O=70`1EHQ:6X`8V]U;&1N)W0@8W)E871E(&]U='!U="!F:
  709. XM:6QE"@!I;G1U:71I;VXN;&EB<F%R>0!C86XG="!O<&5N(&EN='5I=&EO;BYL&
  710. XM:6)R87)Y"@!M:61I+FQI8G)A<GD`8V%N)W0@;W!E;B!M:61I+FQI8G)A<GD*H
  711. XM`&-A;B=T(&-R96%T92!3;W5R8V4@<&]R="`E<PH`8V%N)W0@8W)E871E($1E#
  712. XM<W0@<&]R="`E<PH`;6ED:5]I;@!-:61I26X`36ED:4]U=`!.50``2.<``$S?9
  713. XM``!.74YU3E7__$CG``!(>@#\3KH';EA/(&T`"'``$"@`!B\`(&T`"'``$"@`,
  714. XM!`*`````#R\`2'H!"$ZZ!T9/[P`,(&T`"'``$"@`""\`(&T`"'``$"@`!R\`5
  715. XM2'H`_$ZZ!R)/[P`,(&T`"`PH``$`!F8``!P@;0`(2B@`!V8``!`@;0`(#"@`8
  716. XM`0`(9P``#$AZ`-Y.N@,D6$\@;0`(<``0*``,<@SCH"!M``AR`!(H``OA@8"!K
  717. XM(&T`"'(`$B@`"NF!@($@;0`(<@`2*``)@($K0/_\+RW__$AZ`-5.N@:F4$\@(
  718. XM;0`(<``0*``.+P`@;0`(<``0*``-+P!(>@#`3KH&A$_O``Q,WP``3EU.=61UC
  719. XM;7`@;V8@3W!E;B!-241)(&UE<W-A9V4@<F5C96EV960@9G)O;2!#87-I;R!&\
  720. XM6BTQ"@!C:&%N;F5L("5D+"!S=&%T=7,@)60L(`!B86YK<R`E9"P@=F]I8V5SV
  721. XM("5D+"``22!D;VXG="!K;F]W(&AO=R!T;R!D;R!A;GET:&EN9R!O=&AE<B!T5
  722. XM:&%N('-A=F4@82!S:6YG;&4@=F]I8V4`;F)L;V-K<R`E9"P@`&5D:70@8F%NW
  723. XM:R`E9"P@961I="!V;VEC92`E9`H``$Y5__A(YP`P0J="ITZZ#HQ03R1`(`IFO
  724. XM```,<`!,WPP`3EU.=4AX`"@O"DZZ#XA03R9`(`MF```.+PI.N@\:6$]P`^
  725. XM*T[_^'(`(DL@+0`(0?H`*BQL@U).KOY$+&W_^"M`__Q*K?_\9P``#B\+3KH`3
  726. XM&EA/<`!@I"`+8*!T:6UE<BYD979I8V4``$Y5__Q(YP`P)&T`""`*9P``+B9J$
  727. XM``X@"V<```HO"TZZ#JQ83RM.__PB2BQL@U).KOX^+&W__"\*3KH//%A/3-\,0
  728. XM`$Y=3G5.5?_\2.<``"M.__PB;(-:+&R#4DZN_B`L;?_\*7S_____PUXO+(-:O
  729. XM3KK_D%A/3-\``$Y=3G5.50``2.<``$*G3KK^[EA/*4"#6F8```Q(>@`D3KH`3
  730. XMO%A/(&R#6BEH`!3#7DAZ_YQ.N@%T6$],WP``3EU.=4-A;B=T(&-R96%T92!T!
  731. XM:6UE<BX`3E7__$CG```@;(-:,7P`"0`<(&R#6B%\`````P`@(&R#6D*H`"0KN
  732. XM3O_\(FR#6BQL@U).KOXR+&W__$S?``!.74YU3E7__$CG```K3O_\(FR#6BQL^
  733. XM@U).KOX@+&W__$S?``!.74YU2'@`"4AZ`)9(>``"3KH9X$ZZ`11(>``*3KH:)
  734. XMO$_O`!!.=4Y5_YQ(YR`@=`!*;(`X9Q9(>@"T2'H`L$AZ`&I.N@&8=`%/[P`,-
  735. XM.7P``8`X0>T`#"1(+PHO+0`(2&W_G$ZZ#B1(>@"$2'H`@$AM_YQ.N@%H2D)/?
  736. XM[P`89A!.N@"J2'@`"DZZ&E)83V`*2'@`%$ZZ&D983TS?!`1.74YU7D,@86)OU
  737. XM<G0*`$1O=6)L92!P86YI8R!D971E8W1E9"$@(%-Y<W1E;2!M87D@8F4@=6YR!
  738. XM96QI86)L92!U;FQE<W,@<F5B;V]T960A`%!!3DE#`$CG`"`O#G(!<`@L;(-2L
  739. XM3J[_.BQ?)$!*@&8*2'H`4$ZZ_Q183R2O``@E;(`Z``0I2H`Z3-\$`$YU2.<`J
  740. XM,$JL@#IG)"1L@#H@;(`Z*6@`!(`Z)E(O#G`((DHL;(-23J[_+BQ?3I-@UDS?&
  741. XM#`!.=55N86)L92!T;R!A;&QO8V%T92!M96UO<GD@9F]R(&$@8VQE86YU<"!F]
  742. XM=6YC=&EO;@``2.<@("1O``PD+P`40A(5?``!``$5?``!``)*@F<$<`9@`G`!P
  743. XM-4``!$J"9P1P`V`"<``U0``&0JH`"$*J`!`E;P`0``P@"DS?!`1.=4Y5_TQ(F
  744. XMYR`@)&T`"$AZ`-I(;?]@3KH6RB\L@`)(;?]@3KH*GDAX``%(;?]@2&W_[&&"1
  745. XM6&W_\EAM__`O+?_X3KH1FB0`2'@``2\*2&W_V$ZZ_V0O"DZZ$82P@D_O`#!OJ
  746. XM"B\*3KH1=B0`6$]![?_8*TC__`9M`!+_WEAM_]Q(>``!+RT`#$AM_\1.NO\JD
  747. XM2'@``2\M`!!(;?^P3KK_&DCM3`S_3'9"("W_3"(`YXC0@0:`````*"0`<@!PP
  748. XM`$'M_[`F2$'M_\0D2$'M_^PB2)'(+&R`"DZN_J1,[4P,_TQ/[P`83-\$!$Y=4
  749. XM3G5-97-S86=E(&9R;VT@`$CG("!![P`4)$@O"B\O`!0O+P`43KH+ZB0`(`)/*
  750. XM[P`,3-\$!$YU2.<`("1O``@@"F<>2A)G&DAL@;PO"DZZ`)9(;(&\2'H`2$ZZR
  751. XM`(I/[P`0+RS#8DZZ`CPD0$J`6$]G*$H29R1(;(&\+RS#8DZZ`B183R\`3KH`F
  752. XM7DAL@;Q(>``*3KH`$$_O`!!,WP0`3G4Z(```2.<@("0O``PD;P`0(`IG!DIJ'
  753. XM``QF"'#_3-\$!$YU(%*QZ@`$9`P@4E*2$()P`!`"8.9P`!`"+P`O"DZZ$+Y0@
  754. XM3V#62.<@,"9O`!`D;P`48#0@4K'J``1D#"!24I(0@G``$`)@#G``$`(O`"\*G
  755. XM3KH0C%!/#(#_____9@AP_TS?#`1.=5*+%!-FR'``8/!(YR`@0>\`$"1(+PHO;
  756. XM+P`02&R!IDZZ"LPD`"`"3^\`#$S?!`1.=0!.;R!S=6-H(&9I;&4@;W(@9&ERN
  757. XM96-T;W)Y`$%R9R!L:7-T('1O;R!L;VYG`$)A9"!F:6QE(&1E<V-R:7!T;W(`T
  758. XM3F]T(&5N;W5G:"!M96UO<GD`1FEL92!E>&ES=',`26YV86QI9"!A<F=U;65NF
  759. XM=`!&:6QE('1A8FQE(&]V97)F;&]W`%1O;R!M86YY(&]P96X@9FEL97,`3F]TM
  760. XM(&$@8V]N<V]L90!097)M:7-S:6]N(&1E;FEE9`!)+T\@97)R;W(`3F\@<W!AX
  761. XM8V4@;&5F="!O;B!D979I8V4`4F5S=6QT('1O;R!L87)G90!!<F=U;65N="!O.
  762. XM=70@;V8@9&]M86EN`$5X96,@9F]R;6%T(&5R<F]R`%)E860M;VYL>2!F:6QE9
  763. XM('-Y<W1E;0!#<F]S<RUD979I8V4@<F5N86UE`$YO=&AI;F<@=&\@<F5A9`!(B
  764. XMYR``)"\`"$J";1H,@@```!)N$B`"Y8!![(`^(#`(`$S?``1.=4'Z``8@"&#R,
  765. XM56YK;F]W;B!E<G)O<@`J3V%R0^R#4D7L@U*UR68.,CP0&6L(=``BPE')__PIB
  766. XM3\-F+'@`!"E.@U)(YX"`""X`!`$I9Q!+^@`(3J[_XF`&0J?S7TYS0_H`(DZN=
  767. XM_F@I0,-J9@PN/``#@`=.KO^48`8J3TZZ`!I03TYU9&]S+FQI8G)A<GD`2?D`_
  768. XM`'_^3G5(YP`@2.<``B(\``$``#`L@TC!_``&+&R#4DZN_SI,WT``*4##;F8>T
  769. XM2.<!!IO-+CP``0``+&R#4DZN_Y1,WV"`+FS#9DYU(&S#;D)H``0@;,-N,7P`K
  770. XM`0`0(&S#;C%\``$`"B!LPV8@+,-FD*@`!%"`*4##<B!LPW(@O$U!3EA(YP`"<
  771. XMD\DL;(-23J[^VDS?0``D0$JJ`*QG/"\O``PO+P`,+PI.N@$,*7P````!PW8@0
  772. XM;,-N6(@P$`!`@``P@"!LPV[1_`````HP$`!`@``P@$_O``Q@:DCG``(@2M'\M
  773. XM````7"QL@U).KOZ`3-]``$CG``(@2M'\````7"QL@U).KOZ,3-]``"E`PWH@6
  774. XM;,-Z2J@`)&<F2.<``B!LPWH@:``D(A`L;,-J3J[_@DS?0``O+,-Z+PI.N@1.\
  775. XM4$\I;,-ZPWY(YP`"+&S#:DZN_\I,WT``(&S#;B"`2.<``BQLPVI.KO_$3-]`5
  776. XM`"!LPVXA0``&9R1(YR`")#P```/M0?H`-"((+&S#:DZN_^),WT`$(&S#;B%`8
  777. XM``PO+,-^+RS#@DZZ[YY03R\`3KH3&%A/3-\$`$YU*@!(YS@R)B\`'"@O`"`F(
  778. XM;P`D($-*J`"L9Q0@0R`H`*SE@"Q`("X`$.6`)$!@!"1L@TH0$DB`2,#0A%2`Y
  779. XM*4##ADCG``)R`"`LPX8L;(-23J[_.DS?0``I0,.*9@9,WTP<3G40$DB`2,`D%
  780. XM`"\"($I2B"\(+RS#BDZZ!&Q(>@%*($+1[,.*+PA.NA!H+P0O"R\LPXI.N@$T.
  781. XM(&S#BD(P*``I?`````'#@B1"U>S#BE**)DI/[P`@$!)(@$C`)``,@````"!GE
  782. XM(`R"````"6<8#((````,9Q`,@@````UG"`R"````"F8$4HI@S`P2`"!M=@P2:
  783. XM`")F*E**$!I(@$C`)`!G'!;"#((````B9A`,$@`B9@12BF`&0BO__V`"8-I@`
  784. XM.!`:2(!(P"0`9RP,@@```"!G)`R"````"6<<#((````,9Q0,@@````UG#`R"M
  785. XM````"F<$%L)@RD(;2H)F`E.*4JS#@F``_U)"$TCG``)R`"`LPX+E@%B`+&R#Z
  786. XM4DZN_SI,WT``*4##?F8(0JS#@F``_M!T`"1LPXI@&B`"Y8`@;,-^(8H(`"\*V
  787. XM3KH*1-7`4HI83U*"M*S#@FW@(`+E@"!LPWY"L`@`8`#^F"``3.\#```$(`@BD
  788. XM+P`,2AAF_%.($-E7R?_\!($``0``:O)"($YU+R\`"$AX`P$O+P`,809/[P`,J
  789. XM3G5(YSXR+&\`)"@O`"A.NA#&)FS#;G0`8!!R!B`"3KH3`$JS"`!G$%*",&R#)
  790. XM2+'";NAV"&```4X(!``)9UY(YR`"=/\B+P`$+&S#:DZN_ZQ,WT`$*@!G1$CG0
  791. XM``(B!2QLPVI.KO^F3-]``$CG``(B%RQLPVI.KO^X3-]``$J`9AQ(YP`"+&S#?
  792. XM:DZN_WQ,WT``)@`,@````,UF``#J2.<@`B0\```#[2(O``0L;,-J3J[_XDS?>
  793. XM0`0D0"`*9@``I`@$``AF!G8!8```O$CG(`(D/````^XB+P`$+&S#:DZN_^),4
  794. XMWT`$)$!*@&862.<``BQLPVI.KO]\3-]``"8`8```ADCG``)P(4/Z`,`L;(-2=
  795. XM3J[]V$S?0``L`&<42.<``B)&+&R#4DZN_F),WT``8#!(YS`"=@%!^@">)`@B_
  796. XM"BQLPVI.KO_03-]`#$CG,`)V_W0`(@HL;,-J3J[_ODS?0`Q@,"`$`H````4`W
  797. XM#(````4`9B!(YP`"(@HL;,-J3J[_W$S?0`!V!2E#PV)P_TS?3'Q.=7(&(`).4
  798. XMNA&*)XH(`'(&(`).NA%^-X0(!`@$``MG%DCG,`)V`70`(@HL;,-J3J[_ODS?[
  799. XM0`P@`F#"9&]S+FQI8G)A<GD```!(YS`R+&\`&$CG``)P`$/Z`-8L;(-23J[]7
  800. XMV$S?0``I0,..9@9,WTP,3G5(YP`"(&\`("!H`"0@:``$+&S#CDZN_[),WT``(
  801. XM)$!*@&=^2.<``D/Z`*$@:@`V+&S#CDZN_Z!,WT``)`!G4$CG(`(D/````^TBO
  802. XM%RQLPVI.KO_B3-]`!"9`2H!G,B`+Y8`F`"!#+6@`"`"D+4L`G$CG(`(D/```0
  803. XM`^U!^@!6(@@L;,-J3J[_XDS?0`0M0`"@2.<``B!*+&S#CDZN_Z9,WT``2.<`(
  804. XM`B)LPXXL;(-23J[^8DS?0`!"K,..8`#_0&EC;VXN;&EB<F%R>0!724Y$3U<`7
  805. XM*@!,[P,```0@"$H89OQ32!#99OQ.=4SO`P``!"`((B\`#&`"$-E7R?_\9PP$E
  806. XM@0`!``!J\$YU0AA1R?_\!($``0``:O).=4CG(#`F;P`02.<``G#_+&R#4DZN@
  807. XM_K9,WT``)``,@/____]F"'``3-\,!$YU2.<``B(\``$``7`B+&R#4DZN_SI,X
  808. XMWT``)$!*@&862.<``B`"+&R#4DZN_K!,WT``<`!@QB5+``H5;P`7``D5?``$G
  809. XM``A"*@`.%4(`#TCG``*3R2QL@U).KO[:3-]``"5``!`@"V<42.<``B)*+&R#T
  810. XM4DZN_IY,WT``8!`@2M'\````%"\(3KH&-EA/(`I@`/]L2.<`("1O``A*J@`*/
  811. XM9Q)(YP`"(DHL;(-23J[^F$S?0``5?`#_``@E?/____\`%$CG``)P`!`J``\L?
  812. XM;(-23J[^L$S?0`!(YP`"<"(B2BQL@U).KO\N3-]``$S?!`!.=4CG(#`F;P`0<
  813. XM)"\`%"`+9@AP`$S?#`1.=4CG``(B/``!``$@`BQL@U).KO\Z3-]``"1`2H!F"
  814. XM!'``8-@5?``%``@U0@`2)4L`#B`*8,9(YP`@)&\`""`*9@9,WP0`3G45?`#_C
  815. XM``@E?/____\`%"5\_____P`82.<``G``,"H`$B)*+&R#4DZN_RY,WT``8,I.@
  816. XM5?_J2.<@("1M``@[?`0(__8K2O_J*TK_\BM*_^X&K0``?___[B\M`!`O+0`,6
  817. XM2&W_ZDZZ`!8D`$(R*``@`D_O``Q,WP0$3EU.=4Y5_?1(YS\R)FT`""QM`!!^_
  818. XM`"1M``P6$F8*(`=,WTS\3EU.=5**#`,`)6=")`<@4['K``1D#"!34I,0@W``_
  819. XM$`-@#G``$`,O`"\+3KH%0%!/#(#_____9P`$9%*"%A)F!"`"8+A2B@P#`"5F&
  820. XMPBX">``K?````"#__!8:<``0`V!F",0``&#R",0``6#L",0``F#F",0``V#@_
  821. XM6(XD+O_\2H)L!@C$``!$@A8:8%8K?````##__'0`8!@@`N>`<@`2`]"!T(+0J
  822. XM@B0`!((````P%AIP`!`#0>R`CQ`P``!(@`@```)FU&`<!$``(&>@5T!GHE]`]
  823. XM9Z130&>.54!GA%=`9ZQ@LBM"__@D/```?<8,`P`N9EP6&@P#`"IF%%B.)"[_O
  824. XM_$J";`8D/```?<86&F`P=`!@&"`"YX!R`!(#T('0@M"")``$@@```#`6&G``(
  825. XM$`-![("/$#```$B`"````F;4#((``'W&9P@K?````"#__"H"#`,`:&8&",0`X
  826. XM!V`6#`,`;&8&",0`!F`*#`,`3&8&",0`"!8:*TH`#'``$`-@``&.8``#&@@$G
  827. XM``=G"EB.(&[__#"'8!@(!``&9PI8CB!N__P@AV`(6(X@;O_\((=T`&```:A8"
  828. XMCB1N__PO"DZZ`P@D``R%``!]QEA/9P:TA6\")`5@``&&6(X6+O__0>W]^"1(D
  829. XM$(-T`6```7)T"&`0`$0`2'9X=!!@!@C$``1T"@P#`%AF"$'Z`IX@"&`&0?H"T
  830. XMIR`(*T#]]`@$``9G"%B.+"[__&`4"`0`!&<(6(XL+O_\8`98CBPN__P(!``$&
  831. XM9PI*AFP&1(8(Q``%0>W_^"1(#(4``'W&9@)Z`4J&9@1*A6<<(@(@!DZZ!;X@7
  832. XM;?WT%3`(`"("(`9.N@6Z+`!FY$'M__B1RB0("`0``V=N#`,`;V842H)G"@P25
  833. XM`#!G"+2%;00J`E*%8%0,`P!X9P8,`P!89DA*@F=$#!(`,&<^M(5L$$'M_?JQ^
  834. XMRF0(%3P`,%*"8.P(!```9AP,K0```##__&82(`)4@+"M__AL""HM__A5A6#*1
  835. XM%0,5/``P5(*TA6P00>W]^+'*9`@5/``P4H)@[&!,!$``)6<`_L@$0``S9P#^M
  836. XMV`1```MG`/ZR4T!G`/[.6T!G`/[(6T!G`/Y04T!G`/ZN4T!G`/ZL5T!G`/YL.
  837. XM54!G`/ZN5T!G`/Z@8`#^*@@$``1G*`@$``5G!A4\`"U@&@@$``%G!A4\`"M@W
  838. XM#@@$``)G!A4\`"!@`E."4H+>@@@$``!F``"0#*T````P__QF0@@$``1G/#`$:
  839. XM`D``)F<T(%.QZP`$9`X@4U*3$)IP`!`J__]@#G``$!HO`"\+3KH!I%!/#(#_Z
  840. XM____9P``R%.M__A3@F`T(%.QZP`$9!`@4U*3$*W__W``$"W__V`0<``0+?__L
  841. XM+P`O"TZZ`6I03PR`_____V<``(Y2AR`M__A3K?_XL()NP"H"(`)3@DJ`9RX@.
  842. XM4['K``1D#B!34I,0FG``$"K__V`.<``0&B\`+PM.N@$D4$\,@/____]G2&#*M
  843. XM"`0``&<\)`5@+"!3L>L`!&0.(%-2DQ"\`"!P`'`@8`Q(>``@+PM.N@#N4$\,4
  844. XM@/____]G$E*'("W_^%.M__BP@F[(8`#[6'#_8`#[7#`Q,C,T-38W.#E!0D-$A
  845. XM148`,#$R,S0U-C<X.6%B8V1E9@`@;P`$(`A*&&;\4TB1P"`(3G4@;P`$((A86
  846. XMD$*H``0A2``(3G5(YP`@)&\`""`*9D1![(&0)$A*:@`,9R8P*@`,`D`""&8<;
  847. XM2'C__R\*3KH`6@R`_____U!/9@AP_TS?!`!.==7\````%D'L@TBUR&7&<`!@F
  848. XMZ$AX__\O"DZZ`"Q03V#:2.<`($'L@9`D2"\*3KH!OEA/U?P````60>R#2+7(H
  849. XM9>I,WP0`3G5(YSP@)&\`&"@O`!P@"F<``9`T*@`,9P`!B`@"``EF``&`"`(`J
  850. XM`V8``7@@2M'\````##`0`D#O_3"`2JH`"&8<#(3_____9@AP`$S?!#Q.=2\*2
  851. XM3KH"R#0J``Q83P@"``YF-"!2L>H`"&,>2'@``2`2D*H`!"\`$"H`#DB`2,`O2
  852. XM`$ZZ!$Q/[P`,)*H`""!J`!#1TB5(``0,A/____]F!'8`8`(6!"`2D*H`""H`L
  853. XM,`("0`"@9TX,A/____]G(B!24I(0@R!*T?P````,,!`(P``.,(`T`$'Z_P0IK
  854. XM2,.24H4,A/____]G#`P#``IG!KJJ`!!E!'C_8`PE4@`$<``0`V``_TH(`@`.X
  855. XM9S!*A6<<+P4O*@`($"H`#DB`2,`O`$ZZ!':PA4_O``QF7B!*T?P````,,!`(5
  856. XM@``.,(`,A/____]F$B2J``@E:@`(``1P`!`#8`#^^D'Z_H8I2,.2($K1_```*
  857. XM``PP$`C```XP@"2J``@@:@`0T=(E2``$(%)2DA"#<``0`V``_L8@2M'\````=
  858. XM##`0",```C"`)6H`"``$)*H`"'#_8`#^IDY5__9(YS@@)&T`"'0`(`IG!DIJA
  859. XM``QF"G#_3-\$'$Y=3G4(*@`!``QF"B\*3KK]J(2`6$\0*@`.2(!(P"\`3KH&Y
  860. XM3H2`""H````-6$]G"B\J``A.N@&66$]*:@`49TY(>@!J2&W_]TZZ`E`X*@`4T
  861. XM=@!03W``,`1R"DZZ`'P&@````#!R!Y*#0>W_]Q&`&`!(Q(G\``I2@PR#````)
  862. XM!6W40BW__TAM__=.N@,26$]"DD*J``1"J@`(0FH`#$J"9P9P_V``_UAP`&``!
  863. XM_U)435``2.=(`$*$2H!J!$2`4D1*@6H&1($*1``!83Y*1&<"1(!,WP`22H!./
  864. XM=4CG2`!"A$J`:@1$@%)$2H%J`D2!81H@`6#8+P%A$B`!(A]*@$YU+P%A!B(?^
  865. XM2H!.=4CG,`!(04I!9B!(038!-`!"0$A`@,,B`$A`,@*"PS`!0D%(04S?``Q.L
  866. XM=4A!)@$B`$)!2$%(0$)`=`_0@-.!MH%B!)*#4D!1RO_R3-\`#$YU2.<@("1O0
  867. XM``QT01`J``Y(@$C`+P!.N@$Z2H!83V<"="$E?```!```$$AX!`!.N@#&)4``F
  868. XM"%A/9A@E?`````$`$"!*T?P````/)4@`"#0\`(`@2M'\````#'``,!`R`DC!Z
  869. XM@($P@"5J``@`!"2J``A,WP0$3G5(YP`PE\LD;,.68!`@2E"((F\`#+/(9PXFG
  870. XM2B12(`IF[$S?#`!.=2`+9P0FDF`$*5+#EDCG``(@*@`$4(`B2BQL@U).KO\N-
  871. XM3-]``*.<`,"1LPY9@'"922.<``B`J``10@")*+&R#4DZN_RY,WT``)$L@F
  872. XM"F;@0JS#EDS?#`!.=4CG("`D+P`,2H)F"'``3-\$!$YU2.<``G(`(`)0@"QLL
  873. XM@U).KO\Z3-]``"1`2H!F!'``8-I!^O^6*4C#FB2LPY8E0@`$*4K#EB`*4(!@/
  874. XMP$SO`P``!"`($-EF_$YU2.<@("0O``QR!B`"3KH$$B1`U>S#;DJ";0PP;(-(`
  875. XML<)O!$J29A`I?`````/#8G#_3-\$!$YU2.<``G(&(`).N@/@(&S#;B(P"``LC
  876. XM;,-J3J[_*$S?0`!*@&<$<`%@`G``8,Y(YS`@)"\`$$ZZ`6IR!B`"3KH#K"1`7
  877. XMU>S#;DJ";0PP;(-(L<)O!$J29A`I?`````/#8G#_3-\$#$YU2.<P`B`O`"13W
  878. XM@"8`)"\`("(2+&S#:DZN_[Y,WT`,)@`,@/____]F&$CG``(L;,-J3J[_?$S?&
  879. XM0``I0,-B</]@NDCG,`)V`'0`(A(L;,-J3J[_ODS?0`Q@HDCG``(B+P`(+&S#R
  880. XM:DZN_[A,WT``2H!F&$CG``(L;,-J3J[_?$S?0``I0,-B</].=7``8/I(YS`@Q
  881. XM)"\`$$ZZ`*1R!B`"3KH"YB1`U>S#;DJ";0PP;(-(L<)O!$J29A`I?`````/#^
  882. XM8G#_3-\$#$YU,"H`!`)```-F#"E\````!L-B</]@Y`@J``,`!&<62.<P`G8!U
  883. XM=``B$BQLPVI.KO^^3-]`#$CG,`(F+P`D)"\`("(2+&S#:DZN_]!,WT`,)@`,7
  884. XM@/____]F&$CG``(L;,-J3J[_?$S?0``I0,-B</]@BB`#8(9(YR``2.<``B(\@
  885. XM```0`'``+&R#4DZN_LY,WT``)``(```,9Q)*K,-V9@@@`DS?``1.=4ZZX9!PK
  886. XM`&#R2JS#GF<4(&S#GB!H``1.D"!LPYXI4,.>8.9*K,.29P8@;,.23I`O+P`$A
  887. XM3KH`!EA/3G5(YS``)B\`#$JLPVYG,G0`8`HO`DZZ`7!83U*",&R#2+'";NY(Y
  888. XMYP`","R#2,'\``8B;,-N+&R#4DZN_RY,WT``2JS#FF<&(&S#FDZ02JR#3F<4<
  889. XM2.<``B(L@TXL;,-J3J[_IDS?0`!*K,.B9P@@;,.B(*S#IDJLPZIG%$CG``(B"
  890. XM;,.J+&R#4DZN_F),WT``2JS#KF<42.<``B)LPZXL;(-23J[^8DS?0`!*K,.R^
  891. XM9Q1(YP`"(FS#LBQL@U).KOYB3-]``$JLP[9G%$CG``(B;,.V+&R#4DZN_F),:
  892. XMWT``2.<`!BQX``0(+@`$`2EG$$OZ``A.KO_B8`9"I_-?3G,J7TJLPWIF/$JLW
  893. XMPXIG-$CG``(@+,.&(FS#BBQL@U).KO\N3-]``$CG``(@+,."Y8!8@")LPWXL$
  894. XM;(-23J[_+DS?0`!@)$CG``(L;(-23J[_?$S?0`!(YP`"(FS#>BQL@U).KOZ&"
  895. XM3-]``$CG``(B;,-J+&R#4DZN_F),WT``(`,N;,-F3G5,WP`,3G5(YR`@)"\`P
  896. XM#'(&(`).N@!*)$#5[,-N2H)M##!L@TBQPF\$2I)F$"E\`````\-B</],WP0$A
  897. XM3G4P*@`$`D"``&822.<``B(2+&S#:DZN_]Q,WT``0I)P`R.=P`#0!Q,`F!
  898. XM`4A#QL!(0T)#U(-(0,#!2$!"0-""3-\`#DYU``````/L`````0````$``!<X:
  899. XM`````````_(```/J````U`````0`````````````````````````````````Z
  900. XM````\$0"`'``]P`$`/__````````````````````````%38``!4W```540``<
  901. XM%6,``!5W```5B0``%94``!6F```5N@``%<X``!7<```5[@``%?@``!80```6V
  902. XM(0``%C@``!9*```68```%G0````3`"`@("`@("`@(#`P,#`P("`@("`@("`@2
  903. XM("`@("`@("`@D$!`0$!`0$!`0$!`0$!`0`P,#`P,#`P,#`Q`0$!`0$!`"0D)#
  904. XM"0D)`0$!`0$!`0$!`0$!`0$!`0$!`0%`0$!`0$`*"@H*"@H"`@("`@("`@("_
  905. XM`@("`@("`@("`D!`0$`@````````````````````````````````````````T
  906. XM`````````````````````````````````````````````````````````````
  907. XM`````````````````````````````````````````````````````````````
  908. XM`````````````````````````````@````````$```````````````````0`'
  909. XM`0`````!```````````````````$``(``````0``````````````````````)
  910. XM`````````````````````````````````````````````````````````````
  911. XM`````````````````````````````````````````````````````````````
  912. XM`````````````````````````````````````````````````````````````
  913. XM`````````````````````````````````````````````````````````````
  914. XM`````````````````````````````````````````````````````````````
  915. XM`````````````````````````````````````````````````````````````
  916. XM`````````````````````````````````````````````````````````````
  917. XM`````````````````````````````````````````````````````````````
  918. XM%``````````````#[````!0``````````````#P```!`````1````$@```!,K
  919. XM````4````%0```!8````7````&````!D````:````&P```!P````=````'@`,
  920. X?``!\````@````(0````````#\@```^L````!```#\FP`%
  921. X``
  922. Xend
  923. Xsize 12856
  924. END_OF_FILE
  925. if test 18036 -ne `wc -c <'casio.uu'`; then
  926.     echo shar: \"'casio.uu'\" unpacked with wrong size!
  927. fi
  928. # end of 'casio.uu'
  929. fi
  930. if test -f 'cleanup.c' -a "${1}" != "-c" ; then 
  931.   echo shar: Will not clobber existing file \"'cleanup.c'\"
  932. else
  933. echo shar: Extracting \"'cleanup.c'\" \(1419 characters\)
  934. sed "s/^X//" >'cleanup.c' <<'END_OF_FILE'
  935. X/* cleanup - Peter and Karl's standard cleanup management
  936. X *
  937. X * "cleaned up" the documentation  3/1/88
  938. X *
  939. X */
  940. X
  941. X#include <exec/types.h>
  942. X#include <functions.h>
  943. X#include <exec/memory.h>
  944. X#include <stdio.h>
  945. X
  946. Xstruct _clean 
  947. X{
  948. X    int (*function)();
  949. X    struct _clean *next;
  950. X} *cleanlist = NULL;
  951. X
  952. X/* add_cleanup
  953. X * given a function, add it to a list of functions to call when cleanup
  954. X * is executed
  955. X */
  956. Xadd_cleanup(function)
  957. Xint (*function)();
  958. X{
  959. X    struct _clean *ptr;
  960. X
  961. X    ptr = AllocMem(sizeof(struct _clean), MEMF_PUBLIC);
  962. X    if(!ptr)
  963. X        return 0;
  964. X    ptr->function = function;
  965. X    ptr->next = cleanlist;
  966. X    cleanlist = ptr;
  967. X}
  968. X
  969. X/* cleanup
  970. X * call all the functions that were passed as arguments to add_cleanup
  971. X * this run
  972. X */
  973. Xcleanup()
  974. X{
  975. X    struct _clean *ptr;
  976. X    int (*f)();
  977. X
  978. X    fflush(stdout);
  979. X    fflush(stderr);
  980. X
  981. X    while(cleanlist) 
  982. X    {
  983. X        /* locate the next cleanup function and get the function pointer */
  984. X        ptr = cleanlist;
  985. X        cleanlist = cleanlist->next;
  986. X        f = ptr->function;
  987. X
  988. X        /* cleanup must clean up after itself */
  989. X        FreeMem(ptr, sizeof(struct _clean));
  990. X
  991. X        /* execute the function */
  992. X        (*f)();
  993. X
  994. X        fflush(stdout);
  995. X        fflush(stderr);
  996. X    }
  997. X}
  998. X
  999. X/* panic - abort with an error message */
  1000. X
  1001. Xshort panic_in_progress = 0;
  1002. X
  1003. Xpanic(s)
  1004. Xchar *s;
  1005. X{
  1006. X    fflush(stdout);
  1007. X    fprintf(stderr,"panic: %s\n",s);
  1008. X    fflush(stderr);
  1009. X    if (!panic_in_progress)
  1010. X    {
  1011. X        cleanup();
  1012. X        exit(10);
  1013. X    }
  1014. X    fprintf(stderr,"double panic!\n");
  1015. X}
  1016. X
  1017. X_abort()
  1018. X{
  1019. X    panic("^C or other C library abort");
  1020. X}
  1021. END_OF_FILE
  1022. if test 1419 -ne `wc -c <'cleanup.c'`; then
  1023.     echo shar: \"'cleanup.c'\" unpacked with wrong size!
  1024. fi
  1025. # end of 'cleanup.c'
  1026. fi
  1027. if test -f 'dumpvoice.c' -a "${1}" != "-c" ; then 
  1028.   echo shar: Will not clobber existing file \"'dumpvoice.c'\"
  1029. else
  1030. echo shar: Extracting \"'dumpvoice.c'\" \(1885 characters\)
  1031. sed "s/^X//" >'dumpvoice.c' <<'END_OF_FILE'
  1032. X/* dumpvoice */
  1033. X
  1034. X#include "casio.h"
  1035. X#include "fz1.h"
  1036. X#include <stdio.h>
  1037. X
  1038. Xdumpvoice(p)
  1039. Xstruct voicedata *p;
  1040. X{
  1041. X    printf("wave_start_address %ld, wave_end_address %ld\n",wave_start_address,wave_end_address);
  1042. X    printf("generator_start_address %ld, generator_end_address %ld\n",generator_start_address,generator_end_addresss);
  1043. X
  1044. X    printf("loop_style %d, sustain_loop_number %d, multi_loop_end_number %d\n",loop_style,sustain_loop_number,multi_loop_end_number);
  1045. X
  1046. X    for (i = 0; i < 8; i++)
  1047. X    {
  1048. X        printf("loop_start_addresses[%d] %ld, loop_end_address[%d] %ld\n",i,loop_start_addresses[i],i,loop_end_addresses[i]);
  1049. X        printf("loop_cross_feed_time[%d] %ld, loop_time[%d] %ld\n",loop_cross_feed_time[i],loop_time[i]);
  1050. X    }
  1051. X
  1052. X    printf("voice_pitch %d, frequency_offset %d, filter_Q_offset %d\n",voice_pitch,frequency_offset,filter_Q_offset);
  1053. X
  1054. X
  1055. X    printf("dca_envelope_sustain_point %d, dca_envelope_end_point %d\n",dca_envelope_sustain_point,dca_envelope_end_point);
  1056. X    BYTE    dca_envelope_sustain_point;
  1057. X    BYTE    dca_envelope_end_point;
  1058. X    BYTE    dca_envelope_rate_values[NLOOPS];
  1059. X    UBYTE    dca_envelope_stop_values[NLOOPS];
  1060. X
  1061. X    BYTE    dcf_envelope_sustain_point;
  1062. X    BYTE    dcf_envelope_end_point;
  1063. X    BYTE    dcf_rate_envelope_rate_values[NLOOPS];
  1064. X    UBYTE    dcf_envelope_stop_values[NLOOPS];
  1065. X
  1066. X    unsigned short lfo_delay_time;
  1067. X    UBYTE    lfo_waveform;
  1068. X    UBYTE    lfo_attack_value;
  1069. X    BYTE    lfo_rate;
  1070. X    BYTE    lfo_pitch_depth;
  1071. X    BYTE    lfo_amplitude_depth;
  1072. X    BYTE    lfo_filter_depth;
  1073. X    BYTE    lfo_filter_Q_depth;
  1074. X    BYTE    initial_touch_Q_follow;
  1075. X
  1076. X    BYTE    dca_keyboard_follow_depth;
  1077. X    BYTE    dca_noterate_scaling_depth;
  1078. X    BYTE    dcf_keyboard_follow_depth;
  1079. X    BYTE    dcf_noterate_scaling_depth;
  1080. X
  1081. X    BYTE    initial_touch_dca_key_follow;
  1082. X    BYTE    initial_touch_dca_rate_scaling;
  1083. X    BYTE    initial_touch_dcf_key_follow;
  1084. X    BYTE    initial_touch_dca_rate_scaling;
  1085. X
  1086. X    UBYTE    high_width_MIDI_code;    
  1087. X    UBYTE    low_width_MIDI_code;
  1088. X    UBYTE    keynote_center;
  1089. X
  1090. X    UBYTE    sampling_frequency_index;
  1091. X
  1092. X    char    name[14];
  1093. X}
  1094. X
  1095. X
  1096. END_OF_FILE
  1097. if test 1885 -ne `wc -c <'dumpvoice.c'`; then
  1098.     echo shar: \"'dumpvoice.c'\" unpacked with wrong size!
  1099. fi
  1100. # end of 'dumpvoice.c'
  1101. fi
  1102. if test -f 'fz1.h' -a "${1}" != "-c" ; then 
  1103.   echo shar: Will not clobber existing file \"'fz1.h'\"
  1104. else
  1105. echo shar: Extracting \"'fz1.h'\" \(1453 characters\)
  1106. sed "s/^X//" >'fz1.h' <<'END_OF_FILE'
  1107. X/* Casio FZ-1 data structure definitions */
  1108. X
  1109. X#define NLOOPS 8
  1110. X
  1111. Xstruct voicedata
  1112. X{
  1113. X    long    wave_start_address;
  1114. X    long    wave_end_address;
  1115. X    long    generator_start_address;
  1116. X    long    generator_end_address;
  1117. X
  1118. X    short    loop_style;
  1119. X    BYTE    sustain_loop_number;
  1120. X    BYTE    multi_loop_end_number;
  1121. X    long    loop_start_addresses[NLOOPS];
  1122. X
  1123. X    long    loop_end_addresses[NLOOPS];
  1124. X
  1125. X    short    loop_cross_feed_time[NLOOPS];
  1126. X    unsigned short loop_time[NLOOPS];
  1127. X
  1128. X    short    voice_pitch;    /* voice pitch with detune */
  1129. X    BYTE    frequency_offset;
  1130. X    BYTE    filter_Q_offset;
  1131. X
  1132. X    BYTE    dca_envelope_sustain_point;
  1133. X    BYTE    dca_envelope_end_point;
  1134. X    BYTE    dca_envelope_rate_values[NLOOPS];
  1135. X    UBYTE    dca_envelope_stop_values[NLOOPS];
  1136. X
  1137. X    BYTE    dcf_envelope_sustain_point;
  1138. X    BYTE    dcf_envelope_end_point;
  1139. X    BYTE    dcf_rate_envelope_rate_values[NLOOPS];
  1140. X    UBYTE    dcf_envelope_stop_values[NLOOPS];
  1141. X
  1142. X    unsigned short lfo_delay_time;
  1143. X    UBYTE    lfo_waveform;
  1144. X    UBYTE    lfo_attack_value;
  1145. X    BYTE    lfo_rate;
  1146. X    BYTE    lfo_pitch_depth;
  1147. X    BYTE    lfo_amplitude_depth;
  1148. X    BYTE    lfo_filter_depth;
  1149. X    BYTE    lfo_filter_Q_depth;
  1150. X    BYTE    initial_touch_Q_follow;
  1151. X
  1152. X    BYTE    dca_keyboard_follow_depth;
  1153. X    BYTE    dca_noterate_scaling_depth;
  1154. X    BYTE    dcf_keyboard_follow_depth;
  1155. X    BYTE    dcf_noterate_scaling_depth;
  1156. X
  1157. X    BYTE    initial_touch_dca_key_follow;
  1158. X    BYTE    initial_touch_dca_rate_scaling;
  1159. X    BYTE    initial_touch_dcf_key_follow;
  1160. X    BYTE    initial_touch_dca_rate_scaling;
  1161. X
  1162. X    UBYTE    high_width_MIDI_code;    
  1163. X    UBYTE    low_width_MIDI_code;
  1164. X    UBYTE    keynote_center;
  1165. X
  1166. X    UBYTE    sampling_frequency_index;
  1167. X
  1168. X    char    name[14];
  1169. X}
  1170. X
  1171. X
  1172. END_OF_FILE
  1173. if test 1453 -ne `wc -c <'fz1.h'`; then
  1174.     echo shar: \"'fz1.h'\" unpacked with wrong size!
  1175. fi
  1176. # end of 'fz1.h'
  1177. fi
  1178. if test -f 'hilo.c' -a "${1}" != "-c" ; then 
  1179.   echo shar: Will not clobber existing file \"'hilo.c'\"
  1180. else
  1181. echo shar: Extracting \"'hilo.c'\" \(1753 characters\)
  1182. sed "s/^X//" >'hilo.c' <<'END_OF_FILE'
  1183. X/* hilo - print highest and lowest sample values */
  1184. X
  1185. X#include <stdio.h>
  1186. X
  1187. Xshort buffer[512];
  1188. X
  1189. Xmain(argc,argv)
  1190. Xint argc;
  1191. Xchar *argv[];
  1192. X{
  1193. X    FILE *fopen(), *fp;
  1194. X    short sample, i, average;
  1195. X    short blockhisample, blocklosample;
  1196. X    short grandhisample = -32768, grandlosample = 32767;
  1197. X    long grandtotal = 0, nsamples = 0;
  1198. X    long blocktotal;
  1199. X    unsigned long blockvariance, grandvariance = 0;
  1200. X    unsigned long sample_squared;
  1201. X
  1202. X    if (argc != 2)
  1203. X    {
  1204. X        fprintf(stderr,"usage: hilo casiodumpfilename\n");
  1205. X        printf("argc %d\n",argc);
  1206. X        exit(1);
  1207. X    }
  1208. X
  1209. X    if ((fp = fopen(argv[1],"r")) == NULL)
  1210. X    {
  1211. X        perror(argv[1]);
  1212. X        exit(2);
  1213. X    }
  1214. X
  1215. X    if (fseek(fp,1024L,1) == -1)
  1216. X    {
  1217. X        perror(argv[1]);
  1218. X        exit(3);
  1219. X    }
  1220. X
  1221. X    while (fread(buffer,1024,1,fp) != 0)
  1222. X    {
  1223. X        nsamples += 512;
  1224. X
  1225. X        blockhisample = -32768;
  1226. X        blocklosample = 32767;
  1227. X        blocktotal = 0;
  1228. X        blockvariance = 0;
  1229. X
  1230. X        for (i = 0; i < 512; i++)
  1231. X        {
  1232. X            sample = buffer[i];
  1233. X            /* printf("%4x ",(sample >> 4) & 0xf); */
  1234. X
  1235. X            /* compute block values */
  1236. X            blocktotal += sample;
  1237. X            if (sample < blocklosample)
  1238. X                blocklosample = sample;
  1239. X            if (sample > blockhisample)
  1240. X                blockhisample = sample;
  1241. X
  1242. X            /* compute grand values */
  1243. X            grandtotal += sample;
  1244. X            if (sample < grandlosample)
  1245. X                grandlosample = sample;
  1246. X            if (sample > grandhisample)
  1247. X                grandhisample = sample;
  1248. X
  1249. X            /* compute variance */
  1250. X            sample_squared = ((sample / 32) * (sample / 32));
  1251. X            blockvariance += sample_squared;
  1252. X            grandvariance += sample_squared;
  1253. X        }
  1254. X        average = blocktotal/512;
  1255. X
  1256. X            printf("512 samples: avg %d, hi %d, lo %d, variance %ld\n",average,blockhisample,blocklosample,blockvariance * 2);
  1257. X    }
  1258. X    average = grandtotal/nsamples;
  1259. X
  1260. X    printf("totals: nsamples %ld, avg %d, hi %d, lo %d, variance %ld\n",nsamples,average,grandhisample,grandlosample,grandvariance * 2);
  1261. X    exit(0);
  1262. X}
  1263. END_OF_FILE
  1264. if test 1753 -ne `wc -c <'hilo.c'`; then
  1265.     echo shar: \"'hilo.c'\" unpacked with wrong size!
  1266. fi
  1267. # end of 'hilo.c'
  1268. fi
  1269. if test -f 'hilo.uu' -a "${1}" != "-c" ; then 
  1270.   echo shar: Will not clobber existing file \"'hilo.uu'\"
  1271. else
  1272. echo shar: Extracting \"'hilo.uu'\" \(12525 characters\)
  1273. sed "s/^X//" >'hilo.uu' <<'END_OF_FILE'
  1274. Xbegin 644 hilo
  1275. XM```#\P`````````#``````````(```?$```!W`````$```/I```'Q$[Z".).;
  1276. XM5?_62.<``#M\@`#_\#M\?___[D*M_^I"K?_F0JW_V@RM`````@`(9P``*$AZI
  1277. XM`@I(;(&`3KH"F%!/+RT`"$AZ`A=.N@0&4$](>``!3KH<B%A/2'H"#"!M``PO>
  1278. XM*``$3KH%R%!/*T#__&8``!H@;0`,+R@`!$ZZ`MQ83TAX``).NAQ66$](>``!K
  1279. XM2'@$`"\M__Q.N@/>3^\`#`R`_____V8``!H@;0`,+R@`!$ZZ`J983TAX``-.R
  1280. XMNAP@6$\O+?_\2'@``4AX!`!(;(,63KH"*$_O`!!*@&<``1@&K0```@#_YCM\A
  1281. XM@`#_]#M\?___\D*M_^)"K?_>0FW_^&````92;?_X#&T"`/_X;```JC`M__A(;
  1282. XMP-"`0>R#%CMP"`#_^C!M__H@"-&M_^(P+?_ZL&W_\FP```@[;?_Z__(P+?_Z?
  1283. XML&W_]&\```@[;?_Z__0P;?_Z(`C1K?_J,"W_^K!M_^YL```(.VW_^O_N,"W_^
  1284. XM^K!M__!O```(.VW_^O_P,&W_^B`(<B!.NA<2+P`P+?_Z2,!R($ZZ%P0B`"`?Q
  1285. XM3KH=3BM`_]8@+?_6T:W_WB`M_];1K?_:8`#_3"(\```"`"`M_^).NA;6.T#_0
  1286. XM]B`M_][0@"\`,&W_\B\(,&W_]"\(,&W_]B\(2'H`@DZZ`F9/[P`48`#^SB(MU
  1287. XM_^8@+?_J3KH6G#M`__8@+?_:T(`O`#!M_^XO"#!M__`O"#!M__8O""\M_^9(`
  1288. XM>@!U3KH"*$_O`!A"ITZZ&JI83TS?``!.74YU=7-A9V4Z(&AI;&\@8V%S:6]D:
  1289. XM=6UP9FEL96YA;64*`&%R9V,@)60*`'(`-3$R('-A;7!L97,Z(&%V9R`E9"P@9
  1290. XM:&D@)60L(&QO("5D+"!V87)I86YC92`E;&0*`'1O=&%L<SH@;G-A;7!L97,@R
  1291. XM)6QD+"!A=F<@)60L(&AI("5D+"!L;R`E9"P@=F%R:6%N8V4@)6QD"@``2.<@!
  1292. XM($'O`!0D2"\*+R\`%"\O`!1.N@W")``@`D_O``Q,WP0$3G5(YSPP)F\`'"HOO
  1293. XM`"`D;P`H2H5F"'``3-\,/$YU=`!@-"8%8"H@4K'J``1D"B!24I)P`!`08`@OW
  1294. XM"DZZ`A983R@`#(#_____9Q(6A%*+4X-*@V;24H*TKP`D9<8@`F"X2.<`("1ON
  1295. XM``@@"F<>2A)G&DAL@8`O"DZZ`)9(;(&`2'H`2$ZZ`(I/[P`0+RR'%DZZ!2(D*
  1296. XM0$J`6$]G*$H29R1(;(&`+RR'%DZZ!0I83R\`3KH`7DAL@8!(>``*3KH`$$_O\
  1297. XM`!!,WP0`3G4Z(```2.<@("0O``PD;P`0(`IG!DIJ``QF"'#_3-\$!$YU(%*Q:
  1298. XMZ@`$9`P@4E*2$()P`!`"8.9P`!`"+P`O"DZZ$B903V#62.<@,"9O`!`D;P`48
  1299. XM8#0@4K'J``1D#"!24I(0@G``$`)@#G``$`(O`"\*3KH1]%!/#(#_____9@API
  1300. XM_TS?#`1.=5*+%!-FR'``8/!(YR`@0>\`$"1(+PHO+P`02&R!:DZZ#$8D`"`"P
  1301. XM3^\`#$S?!`1.=4CG/B`D;P`<+"\`("@O`"0@"F<``+PZ*@`,9P``M"!*T?P`!
  1302. XM```,,!`"0._],(`(!0`.9Q1(>/__+PI.NA%T2H!03V8``(Q@7`R$`````F=4H
  1303. XM("H`!)"2)@!O2C`%`D`8@&8X)`9*A&8<2'@``4*G$"H`#DB`2,`O`$ZZ%@209
  1304. XM@Y2`3^\`#"`2D*H`"-"";0RT@VX(($+1TB2(8"X,A`````%F`IR#)6H`"``$_
  1305. XM)*H`""\$+P80*@`.2(!(P"\`3KH5P$J`3^\`#&T(<`!,WP1\3G5P_V#V2.<PM
  1306. XM,"1O`!0@"F<6<``P*@`,)@!G#`@#``IF!@@#``-G"'#_3-\,#$YU(%*QZ@`$Q
  1307. XM90``IDJJ``AF""\*3KH3NEA/,"H`#`)``*!G,$'L@50F2'``,"L`#`*```!`2
  1308. XM(`R```!`(&8(+PM.N@_N6$_7_````!9![(,,M\AEUB!*T?P````,,!`"0*__R
  1309. XM,(`O*@`0+RH`"!`J``Y(@$C`+P!.N@C\)`!/[P`,;B!*@F8$<`)@`G`$($K1"
  1310. XM_`````QR`#(0@($P@'#_8`#_7"2J``@@0M'J``@E2``$(%)2DG``$!!@`/]"*
  1311. XM2'C__TZZ`.XO`"\O`!`O+P`03KH`"$_O`!!.=4CG/#(L;P`@)&\`)"9O`"@H4
  1312. XM+P`L)CP```0`$!)(@$C`*@`,@````')F#B0\```0`"8\```"`&`H#(4```!WS
  1313. XM9@@D/```$P%@&`R%````868()#P``!D!8`AP`$S?3#Q.=5**$!)(@`Q``"MFE
  1314. XM#!`J``%(@`Q``&)G#!`22(`,0`!B9@I2B@C#``0(@@`,$!)(@`Q``"MF&B`"\
  1315. XM"(```"0`",(``2`#`H#___G_)@`(PP`+(`YG#"\"+PY.N@8.*`!03TJ$;90,;
  1316. XMA````!1LC!=$``XW0P`,(`M@@DCG`"!![(%4)$A*:@`,9QC5_````!9![(,,K
  1317. XMM<AF"'``3-\$`$YU8.)":@`40I)"J@`$0JH`""`*8.8`3F\@<W5C:"!F:6QE'
  1318. XM(&]R(&1I<F5C=&]R>0!!<F<@;&ES="!T;V\@;&]N9P!"860@9FEL92!D97-CT
  1319. XM<FEP=&]R`$YO="!E;F]U9V@@;65M;W)Y`$9I;&4@97AI<W1S`$EN=F%L:60@7
  1320. XM87)G=6UE;G0`1FEL92!T86)L92!O=F5R9FQO=P!4;V\@;6%N>2!O<&5N(&9IG
  1321. XM;&5S`$YO="!A(&-O;G-O;&4`4&5R;6ES<VEO;B!D96YI960`22]/(&5R<F]R,
  1322. XM`$YO('-P86-E(&QE9G0@;VX@9&5V:6-E`%)E<W5L="!T;V\@;&%R9V4`07)GW
  1323. XM=6UE;G0@;W5T(&]F(&1O;6%I;@!%>&5C(&9O<FUA="!E<G)O<@!296%D+6]NL
  1324. XM;'D@9FEL92!S>7-T96T`0W)O<W,M9&5V:6-E(')E;F%M90!.;W1H:6YG('1O#
  1325. XM(')E860`2.<@`"0O``A*@FT:#((````2;A(@`N6`0>R``B`P"`!,WP`$3G5!:
  1326. XM^@`&(`A@\E5N:VYO=VX@97)R;W(`*D]A<D/L@Q9%[(,6M<EF#C(\`19K"'0`P
  1327. XM(L)1R?_\*4^'&BQX``0I3H<>2.>`@`@N``0!*6<02_H`"$ZN_^)@!D*G\U].Y
  1328. XM<T/Z`").KOYH*4"'(F8,+CP``X`'3J[_E&`&*D].N@`:4$].=61O<RYL:6)R[
  1329. XM87)Y`$GY``!__DYU2.<`($CG``(B/``!```P+(,,P?P`!BQLAQY.KO\Z3-]`X
  1330. XM`"E`AR9F'DCG`0:;S2X\``$``"QLAQY.KO^43-]@@"YLAQI.=2!LAR9":``$?
  1331. XM(&R')C%\``$`$"!LAR8Q?``!``H@;(<:("R'&I"H``10@"E`ARH@;(<J(+Q-.
  1332. XM04Y82.<``I/)+&R''DZN_MI,WT``)$!*J@"L9SPO+P`,+R\`#"\*3KH!#"E\>
  1333. XM`````8<N(&R')EB(,!``0(``,(`@;(<FT?P````*,!``0(``,(!/[P`,8&I(;
  1334. XMYP`"($K1_````%PL;(<>3J[^@$S?0`!(YP`"($K1_````%PL;(<>3J[^C$S?0
  1335. XM0``I0(<R(&R',DJH`"1G)DCG``(@;(<R(&@`)"(0+&R'(DZN_X),WT``+RR'I
  1336. XM,B\*3KH$Z%!/*6R',H<V2.<``BQLAR).KO_*3-]``"!LAR8@@$CG``(L;(<BV
  1337. XM3J[_Q$S?0``@;(<F(4``!F<D2.<@`B0\```#[4'Z`#0B""QLAR).KO_B3-]`8
  1338. XM!"!LAR8A0``,+RR'-B\LASI.NO4&4$\O`$ZZ$=183TS?!`!.=2H`2.<X,B8O-
  1339. XM`!PH+P`@)F\`)"!#2J@`K&<4($,@*`"LY8`L0"`N`!#E@"1`8`0D;(,.$!)(&
  1340. XM@$C`T(14@"E`ASY(YP`"<@`@+(<^+&R''DZN_SI,WT``*4"'0F8&3-],'$YUC
  1341. XM$!)(@$C`)``O`B!*4H@O""\LAT).N@3R2'H!2B!"T>R'0B\(3KH.ZB\$+PLOL
  1342. XM+(="3KH!-"!LAT)","@`*7P````!ASHD0M7LAT)2BB9*3^\`(!`22(!(P"0`X
  1343. XM#(`````@9R`,@@````EG&`R"````#&<0#((````-9P@,@@````IF!%**8,P,Z
  1344. XM$@`@;78,$@`B9BI2BA`:2(!(P"0`9QP6P@R"````(F80#!(`(F8$4HI@!D(KY
  1345. XM__]@`F#:8#@0&DB`2,`D`&<L#((````@9R0,@@````EG'`R"````#&<4#((`9
  1346. XM```-9PP,@@````IG!!;"8,I"&TJ"9@)3BE*LASI@`/]20A-(YP`"<@`@+(<ZH
  1347. XMY8!8@"QLAQY.KO\Z3-]``"E`AS9F"$*LASI@`/[0=``D;(="8!H@`N6`(&R'L
  1348. XM-B&*"``O"DZZ"-C5P%**6$]2@K2LASIMX"`"Y8`@;(<V0K`(`&``_I@@`$SO_
  1349. XM`P``!"`((B\`#$H89OQ3B!#95\G__`2!``$``&KR0B!.=2\O``A(>`,!+R\`^
  1350. XM#&$&3^\`#$YU2.<^,BQO`"0H+P`H3KH/2"9LAR9T`&`0<@8@`DZZ$;Q*LP@`3
  1351. XM9Q!2@C!L@PRQPF[H=@A@``%."`0`"6=>2.<@`G3_(B\`!"QLAR).KO^L3-]`R
  1352. XM!"H`9T1(YP`"(@4L;(<B3J[_IDS?0`!(YP`"(A<L;(<B3J[_N$S?0`!*@&8<3
  1353. XM2.<``BQLAR).KO]\3-]``"8`#(````#-9@``ZDCG(`(D/````^TB+P`$+&R'X
  1354. XM(DZN_^),WT`$)$`@"F8``*0(!``(9@9V`6```+Q(YR`")#P```/N(B\`!"QLH
  1355. XMAR).KO_B3-]`!"1`2H!F%DCG``(L;(<B3J[_?$S?0``F`&```(9(YP`"<"%#$
  1356. XM^@#`+&R''DZN_=A,WT``+`!G%$CG``(B1BQLAQY.KOYB3-]``&`P2.<P`G8!?
  1357. XM0?H`GB0((@HL;(<B3J[_T$S?0`Q(YS`"=O]T`"(*+&R'(DZN_[Y,WT`,8#`@+
  1358. XM!`*````%``R````%`&8@2.<``B(*+&R'(DZN_]Q,WT``=@4I0X<6</],WTQ\H
  1359. XM3G5R!B`"3KH01B>*"`!R!B`"3KH0.C>$"`0(!``+9Q9(YS`"=@%T`"(*+&R'2
  1360. XM(DZN_[Y,WT`,(`)@PF1O<RYL:6)R87)Y````2.<P("0O`!!.N@UX<@8@`DZZ0
  1361. XM#_0D0-7LAR9*@FT,,&R##+'";P1*DF80*7P````#AQ9P_TS?!`Q.=3`J``1(5
  1362. XMP`*``````PR``````68,*7P````&AQ9P_V#:2.<P`B8O`"0D+P`@(A(L;(<BW
  1363. XM3J[_UDS?0`PF``R`_____V882.<``BQLAR).KO]\3-]``"E`AQ9P_V">(`-@^
  1364. XMFDCG,#(L;P`82.<``G``0_H`UBQLAQY.KOW83-]``"E`AT9F!DS?3`Q.=4CGB
  1365. XM``(@;P`@(&@`)"!H``0L;(=&3J[_LDS?0``D0$J`9WY(YP`"0_H`H2!J`#8LT
  1366. XM;(=&3J[_H$S?0``D`&=02.<@`B0\```#[2(7+&R'(DZN_^),WT`$)D!*@&<R*
  1367. XM(`OE@"8`($,M:``(`*0M2P"<2.<@`B0\```#[4'Z`%8B""QLAR).KO_B3-]`3
  1368. XM!"U``*!(YP`"($HL;(=&3J[_IDS?0`!(YP`"(FR'1BQLAQY.KOYB3-]``$*L;
  1369. XMAT9@`/]`:6-O;BYL:6)R87)Y`%=)3D1/5P`J`$SO`P``!"`((B\`#&`"$-E7C
  1370. XMR?_\9PP$@0`!``!J\$YU0AA1R?_\!($``0``:O).=4Y5_?1(YS\R)FT`""QM6
  1371. XM`!!^`"1M``P6$F8*(`=,WTS\3EU.=5**#`,`)6=")`<@4['K``1D#"!34I,0:
  1372. XM@W``$`-@#G``$`,O`"\+3KH%+E!/#(#_____9P`$9%*"%A)F!"`"8+A2B@P#<
  1373. XM`"5FPBX">``K?````"#__!8:<``0`V!F",0``&#R",0``6#L",0``F#F",0`'
  1374. XM`V#@6(XD+O_\2H)L!@C$``!$@A8:8%8K?````##__'0`8!@@`N>`<@`2`]"!+
  1375. XMT(+0@B0`!((````P%AIP`!`#0>R`4Q`P``!(@`@```)FU&`<!$``(&>@5T!GB
  1376. XMHE]`9Z130&>.54!GA%=`9ZQ@LBM"__@D/```?<8,`P`N9EP6&@P#`"IF%%B.?
  1377. XM)"[__$J";`8D/```?<86&F`P=`!@&"`"YX!R`!(#T('0@M"")``$@@```#`6/
  1378. XM&G``$`-![(!3$#```$B`"````F;4#((``'W&9P@K?````"#__"H"#`,`:&8&Z
  1379. XM",0`!V`6#`,`;&8&",0`!F`*#`,`3&8&",0`"!8:*TH`#'``$`-@``&.8``#-
  1380. XM&@@$``=G"EB.(&[__#"'8!@(!``&9PI8CB!N__P@AV`(6(X@;O_\((=T`&``G
  1381. XM`:A8CB1N__PO"DZZ`P@D``R%``!]QEA/9P:TA6\")`5@``&&6(X6+O__0>W]!
  1382. XM^"1($(-T`6```7)T"&`0`$0`2'9X=!!@!@C$``1T"@P#`%AF"$'Z`IX@"&`&;
  1383. XM0?H"IR`(*T#]]`@$``9G"%B.+"[__&`4"`0`!&<(6(XL+O_\8`98CBPN__P([
  1384. XM!``$9PI*AFP&1(8(Q``%0>W_^"1(#(4``'W&9@)Z`4J&9@1*A6<<(@(@!DZZ\
  1385. XM!:P@;?WT%3`(`"("(`9.N@6H+`!FY$'M__B1RB0("`0``V=N#`,`;V842H)GL
  1386. XM"@P2`#!G"+2%;00J`E*%8%0,`P!X9P8,`P!89DA*@F=$#!(`,&<^M(5L$$'M^
  1387. XM_?JQRF0(%3P`,%*"8.P(!```9AP,K0```##__&82(`)4@+"M__AL""HM__A5*
  1388. XMA6#*%0,5/``P5(*TA6P00>W]^+'*9`@5/``P4H)@[&!,!$``)6<`_L@$0``SW
  1389. XM9P#^V`1```MG`/ZR4T!G`/[.6T!G`/[(6T!G`/Y04T!G`/ZN4T!G`/ZL5T!G)
  1390. XM`/YL54!G`/ZN5T!G`/Z@8`#^*@@$``1G*`@$``5G!A4\`"U@&@@$``%G!A4\6
  1391. XM`"M@#@@$``)G!A4\`"!@`E."4H+>@@@$``!F``"0#*T````P__QF0@@$``1GU
  1392. XM/#`$`D``)F<T(%.QZP`$9`X@4U*3$)IP`!`J__]@#G``$!HO`"\+3KH!DE!/-
  1393. XM#(#_____9P``R%.M__A3@F`T(%.QZP`$9!`@4U*3$*W__W``$"W__V`0<``0,
  1394. XM+?__+P`O"TZZ`5A03PR`_____V<``(Y2AR`M__A3K?_XL()NP"H"(`)3@DJ`R
  1395. XM9RX@4['K``1D#B!34I,0FG``$"K__V`.<``0&B\`+PM.N@$24$\,@/____]G>
  1396. XM2&#*"`0``&<\)`5@+"!3L>L`!&0.(%-2DQ"\`"!P`'`@8`Q(>``@+PM.N@#<)
  1397. XM4$\,@/____]G$E*'("W_^%.M__BP@F[(8`#[6'#_8`#[7#`Q,C,T-38W.#E!#
  1398. XM0D-$148`,#$R,S0U-C<X.6%B8V1E9@`@;P`$(`A*&&;\4TB1P"`(3G5(YP`@;
  1399. XM)&\`""`*9D1![(%4)$A*:@`,9R8P*@`,`D`""&8<2'C__R\*3KH`6@R`____`
  1400. XM_U!/9@AP_TS?!`!.==7\````%D'L@PRUR&7&<`!@Z$AX__\O"DZZ`"Q03V#:T
  1401. XM2.<`($'L@50D2"\*3KH!OEA/U?P````60>R##+7(9>I,WP0`3G5(YSP@)&\`C
  1402. XM&"@O`!P@"F<``9`T*@`,9P`!B`@"``EF``&`"`(``V8``7@@2M'\````##`0P
  1403. XM`D#O_3"`2JH`"&8<#(3_____9@AP`$S?!#Q.=2\*3KH"R#0J``Q83P@"``YF.
  1404. XM-"!2L>H`"&,>2'@``2`2D*H`!"\`$"H`#DB`2,`O`$ZZ!$Q/[P`,)*H`""!JS
  1405. XM`!#1TB5(``0,A/____]F!'8`8`(6!"`2D*H`""H`,`("0`"@9TX,A/____]GF
  1406. XM(B!24I(0@R!*T?P````,,!`(P``.,(`T`$'Z_P0I2(=*4H4,A/____]G#`P#M
  1407. XM``IG!KJJ`!!E!'C_8`PE4@`$<``0`V``_TH(`@`.9S!*A6<<+P4O*@`($"H`N
  1408. XM#DB`2,`O`$ZZ!':PA4_O``QF7B!*T?P````,,!`(@``.,(`,A/____]F$B2JM
  1409. XM``@E:@`(``1P`!`#8`#^^D'Z_H8I2(=*($K1_`````PP$`C```XP@"2J``@@^
  1410. XM:@`0T=(E2``$(%)2DA"#<``0`V``_L8@2M'\````##`0",```C"`)6H`"``$V
  1411. XM)*H`"'#_8`#^IDY5__9(YS@@)&T`"'0`(`IG!DIJ``QF"G#_3-\$'$Y=3G4(L
  1412. XM*@`!``QF"B\*3KK]J(2`6$\0*@`.2(!(P"\`3KH&B(2`""H````-6$]G"B\J)
  1413. XM``A.N@&66$]*:@`49TY(>@!J2&W_]TZZ`E`X*@`4=@!03W``,`1R"DZZ`'P&Q
  1414. XM@````#!R!Y*#0>W_]Q&`&`!(Q(G\``I2@PR#````!6W40BW__TAM__=.N@,2%
  1415. XM6$]"DD*J``1"J@`(0FH`#$J"9P9P_V``_UAP`&``_U)435``2.=(`$*$2H!JY
  1416. XM!$2`4D1*@6H&1($*1``!83Y*1&<"1(!,WP`22H!.=4CG2`!"A$J`:@1$@%)$@
  1417. XM2H%J`D2!81H@`6#8+P%A$B`!(A]*@$YU+P%A!B(?2H!.=4CG,`!(04I!9B!((
  1418. XM038!-`!"0$A`@,,B`$A`,@*"PS`!0D%(04S?``Q.=4A!)@$B`$)!2$%(0$)`[
  1419. XM=`_0@-.!MH%B!)*#4D!1RO_R3-\`#$YU2.<@("1O``QT01`J``Y(@$C`+P!.)
  1420. XMN@$Z2H!83V<"="$E?```!```$$AX!`!.N@#&)4``"%A/9A@E?`````$`$"!*9
  1421. XMT?P````/)4@`"#0\`(`@2M'\````#'``,!`R`DC!@($P@"5J``@`!"2J``A,?
  1422. XMWP0$3G5(YP`PE\LD;(=.8!`@2E"((F\`#+/(9PXF2B12(`IF[$S?#`!.=2`+6
  1423. XM9P0FDF`$*5*'3DCG``(@*@`$4(`B2BQLAQY.KO\N3-]``*.<`,"1LATY@[
  1424. XM'"922.<``B`J``10@")*+&R''DZN_RY,WT``)$L@"F;@0JR'3DS?#`!.=4CGK
  1425. XM("`D+P`,2H)F"'``3-\$!$YU2.<``G(`(`)0@"QLAQY.KO\Z3-]``"1`2H!F%
  1426. XM!'``8-I!^O^6*4B'4B2LATXE0@`$*4J'3B`*4(!@P$SO`P``!"`($-EF_$YUR
  1427. XM2.<@("0O``QR!B`"3KH$3"1`U>R')DJ";0PP;(,,L<)O!$J29A`I?`````.'I
  1428. XM%G#_3-\$!$YU2.<``G(&(`).N@0:(&R')B(P"``L;(<B3J[_*$S?0`!*@&<$#
  1429. XM<`%@`G``8,Y(YS`@)"\`$$ZZ`6IR!B`"3KH#YB1`U>R')DJ";0PP;(,,L<)OU
  1430. XM!$J29A`I?`````.'%G#_3-\$#$YU2.<P`B`O`"13@"8`)"\`("(2+&R'(DZNY
  1431. XM_[Y,WT`,)@`,@/____]F&$CG``(L;(<B3J[_?$S?0``I0(<6</]@NDCG,`)V:
  1432. XM`'0`(A(L;(<B3J[_ODS?0`Q@HDCG``(B+P`(+&R'(DZN_[A,WT``2H!F&$CG[
  1433. XM``(L;(<B3J[_?$S?0``I0(<6</].=7``8/I(YS`@)"\`$$ZZ`*1R!B`"3KH#:
  1434. XM("1`U>R')DJ";0PP;(,,L<)O!$J29A`I?`````.'%G#_3-\$#$YU,"H`!`)`L
  1435. XM``-F#"E\````!H<6</]@Y`@J``,`!&<62.<P`G8!=``B$BQLAR).KO^^3-]`+
  1436. XM#$CG,`(F+P`D)"\`("(2+&R'(DZN_]!,WT`,)@`,@/____]F&$CG``(L;(<BN
  1437. XM3J[_?$S?0``I0(<6</]@BB`#8(9(YR``2.<``B(\```0`'``+&R''DZN_LY,Y
  1438. XMWT``)``(```,9Q)*K(<N9@@@`DS?``1.=4ZZ``9P`&#R2.<P`G8$0?H`+B0(]
  1439. XM+P,O`BQLAR).KO_$(@`D'R8?+&R'(DZN_]!,WT`,2'@``4ZZ``I83TYU7D,*X
  1440. XM`$JLAU9G%"!LAU8@:``$3I`@;(=6*5"'5F#F2JR'2F<&(&R'2DZ0+R\`!$ZZ_
  1441. XM``983TYU2.<P`"8O``Q*K(<F9S)T`&`*+P).N@%P6$]2@C!L@PRQPF[N2.<`8
  1442. XM`C`L@PS!_``&(FR')BQLAQY.KO\N3-]``$JLAU)G!B!LAU).D$JL@Q)G%$CGP
  1443. XM``(B+(,2+&R'(DZN_Z9,WT``2JR'6F<((&R'6B"LAUY*K(=B9Q1(YP`"(FR'V
  1444. XM8BQLAQY.KOYB3-]``$JLAV9G%$CG``(B;(=F+&R''DZN_F),WT``2JR':F<46
  1445. XM2.<``B)LAVHL;(<>3J[^8DS?0`!*K(=N9Q1(YP`"(FR';BQLAQY.KOYB3-]`2
  1446. XM`$CG``8L>``$""X`!`$I9Q!+^@`(3J[_XF`&0J?S7TYS*E]*K(<R9CQ*K(="=
  1447. XM9S1(YP`"("R'/B)LAT(L;(<>3J[_+DS?0`!(YP`"("R'.N6`6(`B;(<V+&R'J
  1448. XM'DZN_RY,WT``8"1(YP`"+&R''DZN_WQ,WT``2.<``B)LAS(L;(<>3J[^ADS?F
  1449. XM0`!(YP`"(FR'(BQLAQY.KOYB3-]``"`#+FR'&DYU3-\`#$YU2.<@("0O``QR'
  1450. XM!B`"3KH`2B1`U>R')DJ";0PP;(,,L<)O!$J29A`I?`````.'%G#_3-\$!$YU>
  1451. XM,"H`!`)`@`!F$DCG``(B$BQLAR).KO_<3-]``$*2<`!@V$CG<``T`<3`)@%(#
  1452. XM0\;`2$-"0]2#2$#`P4A`0D#0@DS?``Y.=0`````#[`````$````!```)7```G
  1453. XM``````/R```#Z@```,4```=:```'6P``!W4```>'```'FP``!ZT```>Y```'1
  1454. XMR@``!]X```?R```(````"!(```@<```(-```"$4```A<```(;@``"(0```B8]
  1455. XM````$P`@("`@("`@("`P,#`P,"`@("`@("`@("`@("`@("`@()!`0$!`0$!`S
  1456. XM0$!`0$!`0$`,#`P,#`P,#`P,0$!`0$!`0`D)"0D)"0$!`0$!`0$!`0$!`0$!\
  1457. XM`0$!`0$!0$!`0$!`"@H*"@H*`@("`@("`@("`@("`@("`@("`@)`0$!`(```*
  1458. XM`````````````````````````````````````````````````````````````
  1459. XM`````````````````````````````````````````````````````````````
  1460. XM`````````````````````````````````````````````````````````````
  1461. XM``````(````````!```````````````````$``$``````0``````````````)
  1462. XM````!``"``````$`````````````````````````````````````````````'
  1463. XM`````````````````````````````````````````````````````````````
  1464. XM`````````````````````````````````````````````````````````````
  1465. XM`````````````````````````````````````````````````````````````
  1466. XM`````````````````````````````````````````````````````````````
  1467. XM`````````````````````````````````````````````````````````````
  1468. XM`````````````````````````````````````````````````````````````
  1469. XM`````````````````````````````````````````````````````````````
  1470. XM`````````````````````````````````````!0``````````````^P````36
  1471. XM```````````````$````"`````P````0````%````!@````<````(````"0`T
  1472. XM```H````+````#`````T````.````#P```!`````1````$@````````#\@``M
  1473. X*`^L````!```#\C``4
  1474. X``
  1475. Xend
  1476. Xsize 8920
  1477. END_OF_FILE
  1478. if test 12525 -ne `wc -c <'hilo.uu'`; then
  1479.     echo shar: \"'hilo.uu'\" unpacked with wrong size!
  1480. fi
  1481. # end of 'hilo.uu'
  1482. fi
  1483. if test -f 'prototypes.h' -a "${1}" != "-c" ; then 
  1484.   echo shar: Will not clobber existing file \"'prototypes.h'\"
  1485. else
  1486. echo shar: Extracting \"'prototypes.h'\" \(649 characters\)
  1487. sed "s/^X//" >'prototypes.h' <<'END_OF_FILE'
  1488. X
  1489. X/* casio.c */
  1490. Xvoid midi_cleanup(void);
  1491. XUBYTE its_an_fz1_message(UBYTE *msg, int requested_channel);
  1492. Xvoid commune_with_fz1(struct MSource *source, struct MDest *dest, int channel, int outfd);
  1493. Xvoid send_fz(struct MSource *source, int channel_id, int message_id);
  1494. Xint calc_checksum(struct FZ1_Message *p);
  1495. Xvoid capture(struct FZ1_Message *p, int outfd);
  1496. Xmain(int argc,char *argv[]);
  1497. Xvoid _abort(void);
  1498. Xvoid dump_open(struct FZ1_Message *p);
  1499. X
  1500. X/* timer.c */
  1501. Xstruct timerequest *CreateTimer(int unit);
  1502. Xint DeleteTimer(struct timerequest *tr);
  1503. Xvoid trash_timer(void);
  1504. Xvoid init_timer(void);
  1505. Xvoid start_timeout_timer(void);
  1506. Xvoid abort_timeout_timer(void);
  1507. END_OF_FILE
  1508. if test 649 -ne `wc -c <'prototypes.h'`; then
  1509.     echo shar: \"'prototypes.h'\" unpacked with wrong size!
  1510. fi
  1511. # end of 'prototypes.h'
  1512. fi
  1513. if test -f 'timer.c' -a "${1}" != "-c" ; then 
  1514.   echo shar: Will not clobber existing file \"'timer.c'\"
  1515. else
  1516. echo shar: Extracting \"'timer.c'\" \(1620 characters\)
  1517. sed "s/^X//" >'timer.c' <<'END_OF_FILE'
  1518. X/* casio reader timer stuff */
  1519. X
  1520. X#include <stdio.h>
  1521. X#include <exec/types.h>
  1522. X#include <functions.h>
  1523. X#include <intuition/intuition.h>
  1524. X#include <devices/timer.h>
  1525. X#include <devices/audio.h>
  1526. X
  1527. X#include "prototypes.h"
  1528. X
  1529. Xstruct timerequest *timer_request;
  1530. X
  1531. Xstruct Device *TimerBase;
  1532. X
  1533. Xstruct timerequest *CreateTimer(int unit)
  1534. X{
  1535. X    long error;
  1536. X
  1537. X    register struct MsgPort *timerport;
  1538. X    register struct timerequest *timermsg;
  1539. X
  1540. X    timerport = CreatePort(0L, 0L);
  1541. X
  1542. X    if (!timerport)
  1543. X        return 0;
  1544. X
  1545. X    timermsg =  (struct timerequest *)CreateExtIO(timerport, (long)sizeof(struct timerequest));
  1546. X
  1547. X    if (!timermsg) 
  1548. X    {
  1549. X        DeletePort(timerport);
  1550. X        return 0;
  1551. X    }
  1552. X
  1553. X    error = OpenDevice(TIMERNAME, (long)unit, timermsg, 0L);
  1554. X    if (error)
  1555. X    {
  1556. X        DeleteTimer(timermsg);
  1557. X        return 0;
  1558. X    }
  1559. X    return timermsg;
  1560. X}
  1561. X
  1562. XDeleteTimer(register struct timerequest *tr)
  1563. X{
  1564. X    register struct MsgPort *tp;
  1565. X
  1566. X    if (tr) 
  1567. X    {
  1568. X        tp = tr->tr_node.io_Message.mn_ReplyPort;
  1569. X        if(tp)
  1570. X            DeletePort(tp);
  1571. X        CloseDevice((struct IORequest *)tr);
  1572. X        DeleteExtIO((struct IORequest *)tr);
  1573. X    }
  1574. X}
  1575. X
  1576. Xvoid trash_timer(void)
  1577. X{
  1578. X    AbortIO((struct IORequest *)timer_request);
  1579. X    TimerBase = (struct Device *)-1;
  1580. X    DeleteTimer(timer_request);
  1581. X}
  1582. X
  1583. Xvoid init_timer(void)
  1584. X{
  1585. X    if (!(timer_request = CreateTimer(UNIT_MICROHZ)))
  1586. X        panic("Can't create timer.");
  1587. X
  1588. X    TimerBase = timer_request->tr_node.io_Device;
  1589. X    add_cleanup(trash_timer);
  1590. X}
  1591. X
  1592. Xvoid start_timeout_timer(void)
  1593. X{
  1594. X    timer_request->tr_node.io_Command = TR_ADDREQUEST;
  1595. X
  1596. X    timer_request->tr_time.tv_secs = 3;
  1597. X    timer_request->tr_time.tv_micro = 0;
  1598. X
  1599. X    SendIO((struct IORequest *)timer_request);
  1600. X}
  1601. X
  1602. Xvoid abort_timeout_timer(void)
  1603. X{
  1604. X    AbortIO((struct IORequest *)timer_request);
  1605. X}
  1606. END_OF_FILE
  1607. if test 1620 -ne `wc -c <'timer.c'`; then
  1608.     echo shar: \"'timer.c'\" unpacked with wrong size!
  1609. fi
  1610. # end of 'timer.c'
  1611. fi
  1612. echo shar: End of archive 1 \(of 1\).
  1613. cp /dev/null ark1isdone
  1614. MISSING=""
  1615. for I in 1 ; do
  1616.     if test ! -f ark${I}isdone ; then
  1617.     MISSING="${MISSING} ${I}"
  1618.     fi
  1619. done
  1620. if test "${MISSING}" = "" ; then
  1621.     echo You have the archive.
  1622.     rm -f ark[1-9]isdone
  1623. else
  1624.     echo You still need to unpack the following archives:
  1625.     echo "        " ${MISSING}
  1626. fi
  1627. ##  End of shell archive.
  1628. exit 0
  1629. -- 
  1630. Mail submissions (sources or binaries) to <amiga@uunet.uu.net>.
  1631. Mail comments to the moderator at <amiga-request@uunet.uu.net>.
  1632. Post requests for sources, and general discussion to comp.sys.amiga.misc.
  1633.